Add test for ChangeElementCommand
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1869 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -272,7 +272,9 @@ svgedit.history.ChangeElementCommand.prototype.apply = function(handler) {
|
||||
else this.elem.setAttribute(attr, this.newValues[attr]);
|
||||
}
|
||||
else {
|
||||
if (attr == "#text") this.elem.textContent = "";
|
||||
if (attr == "#text") {
|
||||
this.elem.textContent = "";
|
||||
}
|
||||
else {
|
||||
this.elem.setAttribute(attr, "");
|
||||
this.elem.removeAttribute(attr);
|
||||
@@ -318,7 +320,9 @@ svgedit.history.ChangeElementCommand.prototype.unapply = function(handler) {
|
||||
else this.elem.setAttribute(attr, this.oldValues[attr]);
|
||||
}
|
||||
else {
|
||||
if (attr == "#text") this.elem.textContent = "";
|
||||
if (attr == "#text") {
|
||||
this.elem.textContent = "";
|
||||
}
|
||||
else this.elem.removeAttribute(attr);
|
||||
}
|
||||
if (attr == "transform") { bChangedTransform = true; }
|
||||
|
||||
Reference in New Issue
Block a user