1 /** 2 * An interface for undoable actions, implemented by classes that specify 3 * how to handle action 4 * 5 * @this {Command} 6 * @constructor 7 * @param objectId = {Number} of {Figure}/{Connector}/{ConnectionPoint} Id 8 * @param typeOfObject = {Number} representing the type of object being changed 9 * @param property = {String} representing properties address within object 10 * @param previousValue = {Object} 11 * @param currentValue = {Object} 12 * @author Zack Newsham zack_newsham@yahoo.co.uk 13 * @author Alex <alex@scriptoid.com> 14 */ 15 function Command(objectId, typeOfObject, property, previousValue, currentValue){ 16 this.objectId = objectId; 17 this.typeOfObject = typeOfObject; 18 this.property = property; 19 this.previousValue = previousValue; 20 this.currentValue = currentValue; 21 } 22 23 24 Command.prototype = { 25 /**This method got called every time the Command must execute*/ 26 redo : function(){ 27 }, 28 29 30 /**This method should be called every time the Command should be undone*/ 31 undo : function(){ 32 } 33 }