Close the first prototype of the new layout
This commit is contained in:
36
mindplot/src/main/javascript/nlayout/ChangeEvent.js
Normal file
36
mindplot/src/main/javascript/nlayout/ChangeEvent.js
Normal file
@@ -0,0 +1,36 @@
|
||||
mindplot.nlayout.ChangeEvent = new Class({
|
||||
initialize:function(id) {
|
||||
$assert(!isNaN(id), "id can not be null");
|
||||
this._id = id;
|
||||
this._position = null;
|
||||
this._order = null;
|
||||
},
|
||||
|
||||
getId:function() {
|
||||
return this._id;
|
||||
},
|
||||
|
||||
getOrder: function() {
|
||||
return this._order;
|
||||
},
|
||||
|
||||
getPosition: function() {
|
||||
return this._position;
|
||||
},
|
||||
|
||||
setOrder: function(value) {
|
||||
$assert(!isNaN(value), "value can not be null");
|
||||
this._order = value;
|
||||
},
|
||||
|
||||
setPosition: function(value) {
|
||||
$assert(value, "value can not be null");
|
||||
this._position = value;
|
||||
},
|
||||
|
||||
toString: function() {
|
||||
return "[order:" + this.getOrder() + ", position: {" + this.getPosition().x + "," + this.getPosition().y + "}]";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user