diff options
Diffstat (limited to 'js/panels/Timeline/Style.reel/Style.js')
-rw-r--r-- | js/panels/Timeline/Style.reel/Style.js | 572 |
1 files changed, 286 insertions, 286 deletions
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js index 122c2c0a..82c2d8ab 100644 --- a/js/panels/Timeline/Style.reel/Style.js +++ b/js/panels/Timeline/Style.reel/Style.js | |||
@@ -31,17 +31,17 @@ POSSIBILITY OF SUCH DAMAGE. | |||
31 | /* | 31 | /* |
32 | * Style component: Edits and manages a single style rule for a Layer in the Timeline. | 32 | * Style component: Edits and manages a single style rule for a Layer in the Timeline. |
33 | * Public Properties: | 33 | * Public Properties: |
34 | * editorProperty: The CSS property for the style. | 34 | * editorProperty: The CSS property for the style. |
35 | * editorValue: The value for the editorProperty. | 35 | * editorValue: The value for the editorProperty. |
36 | * whichView: Which view to show, the hintable view (where a new property can be typed in) | 36 | * whichView: Which view to show, the hintable view (where a new property can be typed in) |
37 | * or the propval view (where the property's value can be set with the tweener). | 37 | * or the propval view (where the property's value can be set with the tweener). |
38 | * Valid values are "hintable" and "propval", defaults to "hintable". | 38 | * Valid values are "hintable" and "propval", defaults to "hintable". |
39 | * | 39 | * |
40 | */ | 40 | */ |
41 | 41 | ||
42 | var Montage = require("montage/core/core").Montage; | 42 | var Montage = require("montage/core/core").Montage; |
43 | var Component = require("montage/ui/component").Component; | 43 | var Component = require("montage/ui/component").Component; |
44 | var ElementsMediator = require("js/mediators/element-mediator").ElementMediator | 44 | var ElementsMediator = require("js/mediators/element-mediator").ElementMediator |
45 | 45 | ||
46 | 46 | ||
47 | var LayerStyle = exports.LayerStyle = Montage.create(Component, { | 47 | var LayerStyle = exports.LayerStyle = Montage.create(Component, { |
@@ -72,151 +72,151 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
72 | }, | 72 | }, |
73 | 73 | ||
74 | /* === BEGIN: Models === */ | 74 | /* === BEGIN: Models === */ |
75 | // isSelected: whether or not the style is selected | 75 | // isSelected: whether or not the style is selected |
76 | _isSelected: { | 76 | _isSelected: { |
77 | value: false | 77 | value: false |
78 | }, | 78 | }, |
79 | isSelected: { | 79 | isSelected: { |
80 | serializable: true, | 80 | serializable: true, |
81 | get: function() { | 81 | get: function() { |
82 | return this._isSelected; | 82 | return this._isSelected; |
83 | }, | 83 | }, |
84 | set: function(newVal) { | 84 | set: function(newVal) { |
85 | 85 | ||
86 | if (newVal !== this._isSelected) { | 86 | if (newVal !== this._isSelected) { |
87 | this._isSelected = newVal; | 87 | this._isSelected = newVal; |
88 | this.needsDraw = true; | 88 | this.needsDraw = true; |
89 | } | 89 | } |
90 | } | 90 | } |
91 | }, | 91 | }, |
92 | 92 | ||
93 | /* isActive: Whether or not the user is actively clicking within the style; used to communicate state with | 93 | /* isActive: Whether or not the user is actively clicking within the style; used to communicate state with |
94 | * parent Layer. | 94 | * parent Layer. |
95 | */ | 95 | */ |
96 | _isActive: { | 96 | _isActive: { |
97 | value: false | 97 | value: false |
98 | }, | 98 | }, |
99 | isActive: { | 99 | isActive: { |
100 | get: function() { | 100 | get: function() { |
101 | return this._isActive; | 101 | return this._isActive; |
102 | }, | 102 | }, |
103 | set: function(newVal) { | 103 | set: function(newVal) { |
104 | this._isActive = newVal; | 104 | this._isActive = newVal; |
105 | } | 105 | } |
106 | }, | 106 | }, |
107 | 107 | ||
108 | // Property for this editor | 108 | // Property for this editor |
109 | _editorProperty: { | 109 | _editorProperty: { |
110 | value: "" | 110 | value: "" |
111 | }, | 111 | }, |
112 | editorProperty: { | 112 | editorProperty: { |
113 | serializable: true, | 113 | serializable: true, |
114 | get: function() { | 114 | get: function() { |
115 | return this._editorProperty; | 115 | return this._editorProperty; |
116 | }, | 116 | }, |
117 | set: function(newVal) { | 117 | set: function(newVal) { |
118 | this._editorProperty = newVal; | 118 | this._editorProperty = newVal; |
119 | this.needsDraw = true; | 119 | this.needsDraw = true; |
120 | } | 120 | } |
121 | }, | 121 | }, |
122 | 122 | ||
123 | // Value for the property for this editor. | 123 | // Value for the property for this editor. |
124 | _editorValue: { | 124 | _editorValue: { |
125 | value: "" | 125 | value: "" |
126 | }, | 126 | }, |
127 | editorValue: { | 127 | editorValue: { |
128 | serializable: true, | 128 | serializable: true, |
129 | get: function() { | 129 | get: function() { |
130 | return this._editorValue; | 130 | return this._editorValue; |
131 | }, | 131 | }, |
132 | set: function(newVal) { | 132 | set: function(newVal) { |
133 | this._editorValue = newVal; | 133 | this._editorValue = newVal; |
134 | this.needsDraw = true; | 134 | this.needsDraw = true; |
135 | } | 135 | } |
136 | }, | 136 | }, |
137 | 137 | ||
138 | // The tweener used to change the value for this property. | 138 | // The tweener used to change the value for this property. |
139 | _ruleTweener: { | 139 | _ruleTweener: { |
140 | value: false | 140 | value: false |
141 | }, | 141 | }, |
142 | ruleTweener: { | 142 | ruleTweener: { |
143 | serializable: true, | 143 | serializable: true, |
144 | get: function() { | 144 | get: function() { |
145 | return this._ruleTweener; | 145 | return this._ruleTweener; |
146 | }, | 146 | }, |
147 | set: function(newVal) { | 147 | set: function(newVal) { |
148 | this._ruleTweener = newVal; | 148 | this._ruleTweener = newVal; |
149 | this.needsDraw = true; | 149 | this.needsDraw = true; |
150 | } | 150 | } |
151 | }, | 151 | }, |
152 | 152 | ||
153 | // The hintable we use to change the Property | 153 | // The hintable we use to change the Property |
154 | _myHintable: { | 154 | _myHintable: { |
155 | value: "" | 155 | value: "" |
156 | }, | 156 | }, |
157 | myHintable: { | 157 | myHintable: { |
158 | get: function() { | 158 | get: function() { |
159 | return this._myHintable; | 159 | return this._myHintable; |
160 | }, | 160 | }, |
161 | set: function(newVal) { | 161 | set: function(newVal) { |
162 | this._myHintable = newVal; | 162 | this._myHintable = newVal; |
163 | }, | 163 | }, |
164 | serializable: true | 164 | serializable: true |
165 | }, | 165 | }, |
166 | _myHintableValue : { | 166 | _myHintableValue : { |
167 | value: null | 167 | value: null |
168 | }, | 168 | }, |
169 | myHintableValue: { | 169 | myHintableValue: { |
170 | get: function() { | 170 | get: function() { |
171 | return this._myHintableValue; | 171 | return this._myHintableValue; |
172 | }, | 172 | }, |
173 | set: function(newVal) { | 173 | set: function(newVal) { |
174 | this._myHintableValue = newVal; | 174 | this._myHintableValue = newVal; |
175 | } | 175 | } |
176 | }, | 176 | }, |
177 | 177 | ||
178 | // swapViews: Is a view swap happening? | 178 | // swapViews: Is a view swap happening? |
179 | _swapViews : { | 179 | _swapViews : { |
180 | value: true | 180 | value: true |
181 | }, | 181 | }, |
182 | 182 | ||
183 | // whichView: which view should we show: hintable or propval | 183 | // whichView: which view should we show: hintable or propval |
184 | _whichView : { | 184 | _whichView : { |
185 | value: "hintable" | 185 | value: "hintable" |
186 | }, | 186 | }, |
187 | whichView: { | 187 | whichView: { |
188 | serializable: true, | 188 | serializable: true, |
189 | get: function() { | 189 | get: function() { |
190 | return this._whichView; | 190 | return this._whichView; |
191 | }, | 191 | }, |
192 | set: function(newVal) { | 192 | set: function(newVal) { |
193 | if (this._whichView !== newVal) { | 193 | if (this._whichView !== newVal) { |
194 | if ((newVal !== "hintable") && (newVal !== "propval")) { | 194 | if ((newVal !== "hintable") && (newVal !== "propval")) { |
195 | this.log("Error: Unknown view -"+newVal+"- requested for style.js."); | 195 | this.log("Error: Unknown view -"+newVal+"- requested for style.js."); |
196 | return; | 196 | return; |
197 | } | 197 | } |
198 | this._whichView = newVal; | 198 | this._whichView = newVal; |
199 | this._swapViews = true; | 199 | this._swapViews = true; |