aboutsummaryrefslogtreecommitdiff
path: root/js/panels/binding/binding-item.reel/binding-item.js
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-02 20:33:31 -0700
committerArmen Kesablyan2012-06-02 20:33:31 -0700
commit6ac505c3fc2b4be7628b9df339ab9f64de700c8b (patch)
tree1ad5f9d03d13d287f4b74cef1d3d82b4b4a15ad8 /js/panels/binding/binding-item.reel/binding-item.js
parent012b2af27a399fd12b58d5be86bd9509c422010d (diff)
parent62d3628e1a00d56a055bfe23a5b21bac1afdf2b8 (diff)
downloadninja-6ac505c3fc2b4be7628b9df339ab9f64de700c8b.tar.gz
Merge pull request #7 from ericguzman/binding
Binding Panel components css update
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