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:
Jeff Schiller
2010-11-13 20:17:21 +00:00
parent e75b51e182
commit 304d83f0ed
2 changed files with 86 additions and 4 deletions

View File

@@ -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; }