diff options
author | Armen Kesablyan | 2012-06-11 10:45:18 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-11 10:45:18 -0700 |
commit | 555fd6efa605b937800b3979a4c68fa7eb8666ae (patch) | |
tree | af23f60668af28bd496b0aa9995ae24d05500922 /js/panels/binding/binding-item.reel | |
parent | cd8f5e98dd1ba97d81a7f1f2362f9ce481577957 (diff) | |
parent | aaac232727c82361771a0804049ada8fae17a549 (diff) | |
download | ninja-555fd6efa605b937800b3979a4c68fa7eb8666ae.tar.gz |
Merge branch 'binding' of https://github.com/dhg637/ninja-internal into binding
Diffstat (limited to 'js/panels/binding/binding-item.reel')
-rw-r--r-- | js/panels/binding/binding-item.reel/binding-item.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js index 55230fc3..a1017020 100644 --- a/js/panels/binding/binding-item.reel/binding-item.js +++ b/js/panels/binding/binding-item.reel/binding-item.js | |||
@@ -12,6 +12,10 @@ exports.BindingItem = Montage.create(Component, { | |||
12 | sourceObjectLabel : { value: null }, | 12 | sourceObjectLabel : { value: null }, |
13 | boundObjectLabel : { value: null }, | 13 | boundObjectLabel : { value: null }, |
14 | 14 | ||
15 | bindingArgs : { | ||
16 | value: null | ||
17 | }, | ||
18 | |||
15 | _sourceObject : { value: null }, | 19 | _sourceObject : { value: null }, |
16 | sourceObject : { | 20 | sourceObject : { |
17 | get: function() { | 21 | get: function() { |
@@ -73,7 +77,9 @@ exports.BindingItem = Montage.create(Component, { | |||
73 | }, | 77 | }, |
74 | set: function(value) { | 78 | set: function(value) { |
75 | if(value === this._oneway) { return; } | 79 | if(value === this._oneway) { return; } |
80 | |||
76 | this._oneway = value; | 81 | this._oneway = value; |
82 | |||
77 | this.needsDraw = true; | 83 | this.needsDraw = true; |
78 | } | 84 | } |
79 | }, | 85 | }, |
@@ -82,13 +88,19 @@ exports.BindingItem = Montage.create(Component, { | |||
82 | 88 | ||
83 | handleDirectionToggleButtonAction : { | 89 | handleDirectionToggleButtonAction : { |
84 | value: function(e) { | 90 | value: function(e) { |
91 | var controller = this.application.ninja.objectsController; | ||
92 | |||
85 | this.oneway = !this.oneway; | 93 | this.oneway = !this.oneway; |
94 | controller.editBinding(this.bindingArgs, { | ||
95 | oneway: !this.bindingArgs.oneway | ||
96 | }); | ||
97 | controller.currentItem = controller.currentItem; | ||
86 | } | 98 | } |
87 | }, | 99 | }, |
88 | 100 | ||
89 | handleEditButtonAction : { | 101 | handleEditButtonAction : { |
90 | value: function(e) { | 102 | value: function(e) { |
91 | this.parentComponent.parentComponent.displayEditView(); | 103 | this.parentComponent.parentComponent.displayEditView(this.bindingArgs); |
92 | } | 104 | } |
93 | }, | 105 | }, |
94 | 106 | ||