diff options
Diffstat (limited to 'js/panels/Timeline/Style.reel')
-rw-r--r-- | js/panels/Timeline/Style.reel/Style.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js index 796385d0..bf254795 100644 --- a/js/panels/Timeline/Style.reel/Style.js +++ b/js/panels/Timeline/Style.reel/Style.js | |||
@@ -19,6 +19,23 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
19 | }, | 19 | }, |
20 | 20 | ||
21 | /* === BEGIN: Models === */ | 21 | /* === BEGIN: Models === */ |
22 | // isSelected: whether or not the style is selected | ||
23 | _isSelected: { | ||
24 | serializable: true, | ||
25 | value: false | ||
26 | }, | ||
27 | isSelected: { | ||
28 | serializable: true, | ||
29 | get: function() { | ||
30 | return this._isSelected; | ||
31 | }, | ||
32 | set: function(newVal) { | ||
33 | if (newVal !== this._isSelected) { | ||
34 | this._isSelected = newVal; | ||
35 | this.needsDraw = true; | ||
36 | } | ||
37 | } | ||
38 | }, | ||
22 | 39 | ||
23 | // Property for this editor | 40 | // Property for this editor |
24 | _editorProperty: { | 41 | _editorProperty: { |
@@ -152,6 +169,11 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
152 | // Show the right thing | 169 | // Show the right thing |
153 | this._showView(); | 170 | this._showView(); |
154 | } | 171 | } |
172 | if (this.isSelected) { | ||
173 | this.element.classList.add("selected"); | ||
174 | } else { | ||
175 | this.element.classList.remove("selected"); | ||
176 | } | ||
155 | } | 177 | } |
156 | }, | 178 | }, |
157 | didDraw: { | 179 | didDraw: { |