added missing semicolons

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2386 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Bruno Heridet 2013-02-14 12:57:15 +00:00
parent d51f96012b
commit edcc7edec6
1 changed files with 19 additions and 18 deletions

View File

@ -72,7 +72,7 @@ svgedit.history.MoveElementCommand = function(elem, oldNextSibling, oldParent, t
this.newNextSibling = elem.nextSibling;
this.newParent = elem.parentNode;
};
svgedit.history.MoveElementCommand.type = function() { return 'svgedit.history.MoveElementCommand'; }
svgedit.history.MoveElementCommand.type = function() { return 'svgedit.history.MoveElementCommand'; };
svgedit.history.MoveElementCommand.prototype.type = svgedit.history.MoveElementCommand.type;
// Function: svgedit.history.MoveElementCommand.getText
@ -129,7 +129,7 @@ svgedit.history.InsertElementCommand = function(elem, text) {
this.parent = elem.parentNode;
this.nextSibling = this.elem.nextSibling;
};
svgedit.history.InsertElementCommand.type = function() { return 'svgedit.history.InsertElementCommand'; }
svgedit.history.InsertElementCommand.type = function() { return 'svgedit.history.InsertElementCommand'; };
svgedit.history.InsertElementCommand.prototype.type = svgedit.history.InsertElementCommand.type;
// Function: svgedit.history.InsertElementCommand.getText
@ -191,7 +191,7 @@ svgedit.history.RemoveElementCommand = function(elem, oldNextSibling, oldParent,
// special hack for webkit: remove this element's entry in the svgTransformLists map
svgedit.transformlist.removeElementFromListMap(elem);
};
svgedit.history.RemoveElementCommand.type = function() { return 'svgedit.history.RemoveElementCommand'; }
svgedit.history.RemoveElementCommand.type = function() { return 'svgedit.history.RemoveElementCommand'; };
svgedit.history.RemoveElementCommand.prototype.type = svgedit.history.RemoveElementCommand.type;
// Function: svgedit.history.RemoveElementCommand.getText
@ -261,7 +261,7 @@ svgedit.history.ChangeElementCommand = function(elem, attrs, text) {
else this.newValues[attr] = elem.getAttribute(attr);
}
};
svgedit.history.ChangeElementCommand.type = function() { return 'svgedit.history.ChangeElementCommand'; }
svgedit.history.ChangeElementCommand.type = function() { return 'svgedit.history.ChangeElementCommand'; };
svgedit.history.ChangeElementCommand.prototype.type = svgedit.history.ChangeElementCommand.type;
// Function: svgedit.history.ChangeElementCommand.getText
@ -280,7 +280,7 @@ svgedit.history.ChangeElementCommand.prototype.apply = function(handler) {
for(var attr in this.newValues ) {
if (this.newValues[attr]) {
if (attr == "#text") this.elem.textContent = this.newValues[attr];
else if (attr == "#href") svgedit.utilities.setHref(this.elem, this.newValues[attr])
else if (attr == "#href") svgedit.utilities.setHref(this.elem, this.newValues[attr]);
else this.elem.setAttribute(attr, this.newValues[attr]);
}
else {
@ -385,7 +385,7 @@ svgedit.history.BatchCommand = function(text) {
this.text = text || "Batch Command";
this.stack = [];
};
svgedit.history.BatchCommand.type = function() { return 'svgedit.history.BatchCommand'; }
svgedit.history.BatchCommand.type = function() { return 'svgedit.history.BatchCommand'; };
svgedit.history.BatchCommand.prototype.type = svgedit.history.BatchCommand.type;
// Function: svgedit.history.BatchCommand.getText
@ -566,9 +566,11 @@ svgedit.history.UndoManager.prototype.beginUndoableChange = function(attrName, e
elements[i] = elem;
oldValues[i] = elem.getAttribute(attrName);
}
this.undoableChangeStack[p] = {'attrName': attrName,
this.undoableChangeStack[p] = {
'attrName': attrName,
'oldValues': oldValues,
'elements': elements};
'elements': elements
};
};
// Function: svgedit.history.UndoManager.finishUndoableChange
@ -581,14 +583,14 @@ svgedit.history.UndoManager.prototype.beginUndoableChange = function(attrName, e
svgedit.history.UndoManager.prototype.finishUndoableChange = function() {
var p = this.undoChangeStackPointer--;
var changeset = this.undoableChangeStack[p];
var i = changeset['elements'].length;
var attrName = changeset['attrName'];
var i = changeset.elements.length;
var attrName = changeset.attrName;
var batchCmd = new svgedit.history.BatchCommand("Change " + attrName);
while (i--) {
var elem = changeset['elements'][i];
var elem = changeset.elements[i];
if (elem == null) continue;
var changes = {};
changes[attrName] = changeset['oldValues'][i];
changes[attrName] = changeset.oldValues[i];
if (changes[attrName] != elem.getAttribute(attrName)) {
batchCmd.addSubCommand(new svgedit.history.ChangeElementCommand(elem, changes, attrName));
}
@ -597,5 +599,4 @@ svgedit.history.UndoManager.prototype.finishUndoableChange = function() {
return batchCmd;
};
})();