diff options
Diffstat (limited to 'js/panels')
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 33fed17a..bb7ce735 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -147,7 +147,6 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
147 | 147 | ||
148 | }, | 148 | }, |
149 | 149 | ||
150 | |||
151 | draw:{ | 150 | draw:{ |
152 | value:function () { | 151 | value:function () { |
153 | this.element.style.left = this.spanPosition + "px"; | 152 | this.element.style.left = this.spanPosition + "px"; |
@@ -186,20 +185,14 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
186 | if (this.application.ninja.selectedElements[0] != this.parentComponent.parentComponent.animatedElement) { | 185 | if (this.application.ninja.selectedElements[0] != this.parentComponent.parentComponent.animatedElement) { |
187 | console.log("Wrong element selected for this keyframe track"); | 186 | console.log("Wrong element selected for this keyframe track"); |
188 | } else { | 187 | } else { |
189 | if (useAbsolute) { | 188 | this.setTweenProperties(event.detail); |
190 | this.setAbsoluteTweenProperties(event.detail); | ||
191 | } else { | ||
192 | this.setRelativeTweenProperties(event.detail); | ||
193 | } | ||
194 | } | 189 | } |
195 | } | 190 | } |
196 | |||
197 | |||
198 | } | 191 | } |
199 | } | 192 | } |
200 | }, | 193 | }, |
201 | 194 | ||
202 | setAbsoluteTweenProperties:{ | 195 | setTweenProperties:{ |
203 | value:function (eventDetail) { | 196 | value:function (eventDetail) { |
204 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ | 197 | if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ |
205 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; | 198 | this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop; |
@@ -222,17 +215,10 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
222 | } | 215 | } |
223 | }, | 216 | }, |
224 | 217 | ||
225 | setRelativeTweenProperties:{ | ||
226 | value:function(eventDetail){ | ||
227 | //console.log(eventDetail); | ||
228 | } | ||
229 | }, | ||
230 | |||
231 | setStyleTweenProperty:{ | 218 | setStyleTweenProperty:{ |
232 | value:function (eventDetail) { | 219 | value:function (eventDetail) { |
233 | //console.log("Setting style tween properties for: " + this.parentComponent.parentComponent.trackEditorProperty); | 220 | //console.log("Setting style tween properties for: " + this.parentComponent.parentComponent.trackEditorProperty); |
234 | //console.log(eventDetail); | 221 | //console.log(eventDetail); |
235 | |||
236 | if(eventDetail.type == "setProperties"){ | 222 | if(eventDetail.type == "setProperties"){ |
237 | // need to ignore top, left, width, and height | 223 | // need to ignore top, left, width, and height |
238 | //console.log(eventDetail.data.value[0]); | 224 | //console.log(eventDetail.data.value[0]); |
@@ -292,7 +278,6 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
292 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); | 278 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); |
293 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "width", [currentWidth], "Change", "tween"); | 279 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "width", [currentWidth], "Change", "tween"); |
294 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "height", [currentHeight], "Change", "tween"); | 280 | this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "height", [currentHeight], "Change", "tween"); |
295 | |||
296 | } | 281 | } |
297 | } | 282 | } |
298 | }, | 283 | }, |
@@ -301,10 +286,8 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
301 | value:function(){ | 286 | value:function(){ |
302 | // turn off event listener for element change | 287 | // turn off event listener for element change |
303 | this.eventManager.removeEventListener("elementChange", this, false); | 288 | this.eventManager.removeEventListener("elementChange", this, false); |
304 | |||
305 | // deselect the keyframe for this tween | 289 | // deselect the keyframe for this tween |
306 | this.keyframe.deselectKeyframe(); | 290 | this.keyframe.deselectKeyframe(); |
307 | } | 291 | } |
308 | } | 292 | } |
309 | |||
310 | }); | 293 | }); |