diff options
author | Jon Reid | 2012-02-07 18:44:06 -0800 |
---|---|---|
committer | Jon Reid | 2012-02-07 18:44:06 -0800 |
commit | ad81fc7e75225d24ffaf59bb179a32aa12f5141a (patch) | |
tree | 5666374f64a16fe83b6d6d627f77d041341be51f /js/panels/Timeline/Style.reel/Style.js | |
parent | e247f0c9bd596f0aeba6f6239ea9bd4178f5d50d (diff) | |
download | ninja-ad81fc7e75225d24ffaf59bb179a32aa12f5141a.tar.gz |
Timeline: select/deselect layers. Work on focus/blur for layers.
Diffstat (limited to 'js/panels/Timeline/Style.reel/Style.js')
-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: { |