aboutsummaryrefslogtreecommitdiff
path: root/js/panels/binding/binding-item.reel/binding-item.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-02 20:57:00 -0700
committerArmen Kesablyan2012-06-02 20:57:00 -0700
commit2136cbf21beeaf7550a0a8d94c1fc246c3dcefb2 (patch)
treec475bf0f30d334584ffb617175c2e027438f058e /js/panels/binding/binding-item.reel/binding-item.js
parent7655e32da5bcdf7b205afc1908c9b7bcc661b0d4 (diff)
parent6ac505c3fc2b4be7628b9df339ab9f64de700c8b (diff)
downloadninja-2136cbf21beeaf7550a0a8d94c1fc246c3dcefb2.tar.gz
Merge branch 'binding' of https://github.com/dhg637/ninja-internal into binding
Conflicts: js/tools/bindingTool.js Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/panels/binding/binding-item.reel/binding-item.js')
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js
index bda62ef3..0fc06ea8 100644
--- a/js/panels/binding/binding-item.reel/binding-item.js
+++ b/js/panels/binding/binding-item.reel/binding-item.js
@@ -74,6 +74,16 @@ exports.BindingItem = Montage.create(Component, {
74 } 74 }
75 }, 75 },
76 76
77 /* -------------- Events -------------- */
78
79 handleDirectionToggleButtonAction : {
80 value: function(e) {
81 this.oneway = !this.oneway;
82 }
83 },
84
85 /* -------------- Component Draw Cycle -------------- */
86
77 templateDidLoad : { 87 templateDidLoad : {
78 value: function() { 88 value: function() {
79 console.log("loaded binding item"); 89 console.log("loaded binding item");
@@ -84,5 +94,15 @@ exports.BindingItem = Montage.create(Component, {
84 value: function() { 94 value: function() {
85 console.log("preparing to draw binding item"); 95 console.log("preparing to draw binding item");
86 } 96 }
97 },
98
99 draw : {
100 value: function() {
101 if(this.oneway) {
102 this.directionToggleButton.element.classList.remove('two-way');
103 } else {
104 this.directionToggleButton.element.classList.add('two-way');
105 }
106 }
87 } 107 }
88}); \ No newline at end of file 108}); \ No newline at end of file