Keep fixing issues.

This commit is contained in:
Paulo Veiga
2011-09-09 02:22:44 -03:00
parent 0c216778e5
commit 2a4d96151b
15 changed files with 157 additions and 98 deletions

View File

@@ -191,11 +191,11 @@ mindplot.model.INodeModel = new Class({
},
putProperty: function(key, value) {
getPropertiesKeys : function() {
throw "Unsupported operation";
},
setProperty: function(key, value) {
putProperty: function(key, value) {
throw "Unsupported operation";
},
@@ -269,6 +269,16 @@ mindplot.model.INodeModel = new Class({
inspect : function() {
return '(type:' + this.getType() + ' , id: ' + this.getId() + ')';
},
copyTo : function(target) {
var source = this;
var keys = source.getPropertiesKeys();
keys.forEach(function(key) {
var value = source.getProperty(key);
target.putProperty(value);
});
return target;
}
});