Fix Bug 80: add text controls for x,y (merge Alexis' patch)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@371 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2009-08-13 15:42:41 +00:00
parent 794db6ba98
commit 83275046b4
4 changed files with 16 additions and 2 deletions

View File

@@ -2079,7 +2079,10 @@ function SvgCanvas(c)
if (attr == "#text") elem.textContent = val;
else elem.setAttribute(attr, val);
selectedBBoxes[i] = elem.getBBox();
selectorManager.requestSelector(elem).resize(selectedBBoxes[i]);
// Timeout needed for Opera & Firefox
setTimeout(function() {
selectorManager.requestSelector(elem).resize(selectedBBoxes[i]);
},0);
var changes = {};
changes[attr] = oldval;
batchCmd.addSubCommand(new ChangeElementCommand(elem, changes, attr));
@@ -2096,6 +2099,10 @@ function SvgCanvas(c)
$(container).mousedown(mouseDown);
$(container).mousemove(mouseMove);
// TODO: Unfortunately Mozilla does not handle internal references to gradients
// inside a data: URL document. This means that any elements filled/stroked
// with a gradient will appear black in Firefox, etc. See bug 308590
// https://bugzilla.mozilla.org/show_bug.cgi?id=308590
this.saveHandler = function(svg) {
window.open("data:image/svg+xml;base64," + Utils.encode64(svg));
};