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