aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-11 10:45:18 -0700
committerArmen Kesablyan2012-06-11 10:45:18 -0700
commit555fd6efa605b937800b3979a4c68fa7eb8666ae (patch)
treeaf23f60668af28bd496b0aa9995ae24d05500922 /js/controllers
parentcd8f5e98dd1ba97d81a7f1f2362f9ce481577957 (diff)
parentaaac232727c82361771a0804049ada8fae17a549 (diff)
downloadninja-555fd6efa605b937800b3979a4c68fa7eb8666ae.tar.gz
Merge branch 'binding' of https://github.com/dhg637/ninja-internal into binding
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/objects-controller.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js
index ee203336..2ce10e82 100644
--- a/js/controllers/objects-controller.js
+++ b/js/controllers/objects-controller.js
@@ -69,15 +69,23 @@ var objectsController = exports.ObjectsController = Montage.create(Component, {
69 value: function(bindingArgs) { 69 value: function(bindingArgs) {
70 if(!bindingArgs) { return; } 70 if(!bindingArgs) { return; }
71 71
72
73
72 Object.deleteBinding(bindingArgs.sourceObject, bindingArgs.sourceObjectPropertyPath); 74 Object.deleteBinding(bindingArgs.sourceObject, bindingArgs.sourceObjectPropertyPath);
73 } 75 }
74 }, 76 },
75 77
76 editBindingPropertyPath : { 78 editBinding : {
77 value: function(bindingArgs, newPropertyPath) { 79 value: function(bindingArgs, newProperties) {
80 var property;
81
78 this.removeBinding(bindingArgs); 82 this.removeBinding(bindingArgs);
79 83
80 bindingArgs.boundObjectPropertyPath = 'newPropertyPath'; 84 if(newProperties) {
85 for(property in newProperties) {
86 bindingArgs[property] = newProperties[property];
87 }
88 }
81 89
82 this.addBinding(bindingArgs); 90 this.addBinding(bindingArgs);
83 } 91 }
@@ -171,7 +179,7 @@ var objectsController = exports.ObjectsController = Montage.create(Component, {
171 return this._currentObject; 179 return this._currentObject;
172 }, 180 },
173 set: function(value) { 181 set: function(value) {
174 if(value === this._currentObject) { return; } 182 //if(value === this._currentObject) { return; }
175 183
176 if(value) { 184 if(value) {
177 this.currentObjectBindings = this.getObjectBindings(value); 185 this.currentObjectBindings = this.getObjectBindings(value);