diff options
Diffstat (limited to 'js/panels/binding/binding-item.reel/binding-item.js')
-rw-r--r-- | js/panels/binding/binding-item.reel/binding-item.js | 20 |
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 |