Fix bug with applying text attribute changes. Change to select mode AFTER setting new attribute on text element. https://code.google.com/p/svg-edit/issues/detail?id=1143
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2525 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
c3bea689b2
commit
02adda7a98
|
@ -6655,11 +6655,6 @@ var changeSelectedAttributeNoUndo = function(attr, newValue, elems) {
|
|||
var elem = elems[i];
|
||||
if (elem == null) continue;
|
||||
|
||||
// Go into "select" mode for text changes
|
||||
if (current_mode === "textedit" && attr !== "#text" && elem.textContent.length) {
|
||||
textActions.toSelectMode(elem);
|
||||
}
|
||||
|
||||
// Set x,y vals on elements that don't have them
|
||||
if ((attr === 'x' || attr === 'y') && no_xy_elems.indexOf(elem.tagName) >= 0) {
|
||||
var bbox = getStrokedBBox([elem]);
|
||||
|
@ -6704,6 +6699,15 @@ var changeSelectedAttributeNoUndo = function(attr, newValue, elems) {
|
|||
setHref(elem, newValue);
|
||||
}
|
||||
else elem.setAttribute(attr, newValue);
|
||||
|
||||
// Go into "select" mode for text changes
|
||||
// NOTE: Important that this happens AFTER elem.setAttribute() or else attributes like
|
||||
// font-size can get reset to their old value, ultimately by svgEditor.updateContextPanel(),
|
||||
// after calling textActions.toSelectMode() below
|
||||
if (current_mode === "textedit" && attr !== "#text" && elem.textContent.length) {
|
||||
textActions.toSelectMode(elem);
|
||||
}
|
||||
|
||||
// if (i==0)
|
||||
// selectedBBoxes[0] = svgedit.utilities.getBBox(elem);
|
||||
// Use the Firefox ffClone hack for text elements with gradients or
|
||||
|
|
Loading…
Reference in New Issue