diff options
author | Armen Kesablyan | 2012-06-11 10:25:49 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-11 10:25:49 -0700 |
commit | aaac232727c82361771a0804049ada8fae17a549 (patch) | |
tree | cd9110dacb9e39e98a5d8bbd7f1dad2780cbcc1a /js/panels/binding/binding-item.reel/binding-item.js | |
parent | 6a27268ebf1cd5fa7bf8313eb5712fd5f6985758 (diff) | |
parent | dbb36888eda1f25387852ea79aef89d22dfd7799 (diff) | |
download | ninja-aaac232727c82361771a0804049ada8fae17a549.tar.gz |
Merge pull request #11 from ericguzman/binding
Binding
Diffstat (limited to 'js/panels/binding/binding-item.reel/binding-item.js')
-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 | ||