diff options
Diffstat (limited to 'js/panels/Timeline/PropertyTrack.reel')
-rw-r--r-- | js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index af58199a..d785ea3e 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js | |||
@@ -35,7 +35,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
35 | var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); | 35 | var selectedIndex = this.application.ninja.timeline.getLayerIndexByID(this.trackID); |
36 | if (selectedIndex !== false) { | 36 | if (selectedIndex !== false) { |
37 | if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) { | 37 | if (!this.application.ninja.timeline.arrLayers[selectedIndex].layerData.created) { |
38 | //this.retrieveStoredStyleTweens(); | 38 | this.retrieveStoredStyleTweens(); |
39 | } | 39 | } |
40 | } | 40 | } |
41 | } | 41 | } |
@@ -240,6 +240,14 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
240 | 240 | ||
241 | var newTween = {}; | 241 | var newTween = {}; |
242 | newTween.tweenData = {}; | 242 | newTween.tweenData = {}; |
243 | newTween.tweenData.tweenedProperties = []; | ||
244 | |||
245 | // TODO - check for color values vs px values and set the correct default | ||
246 | var propVal = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty); | ||
247 | if(propVal == null){ | ||
248 | propVal = "1px"; | ||
249 | } | ||
250 | newTween.tweenData.tweenedProperties[this.trackEditorProperty] = propVal; | ||
243 | 251 | ||
244 | if (clickPos == 0) { | 252 | if (clickPos == 0) { |
245 | newTween.tweenData.spanWidth = 0; | 253 | newTween.tweenData.spanWidth = 0; |
@@ -247,8 +255,6 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
247 | newTween.tweenData.keyFrameMillisec = 0; | 255 | newTween.tweenData.keyFrameMillisec = 0; |
248 | newTween.tweenData.tweenID = 0; | 256 | newTween.tweenData.tweenID = 0; |
249 | newTween.tweenData.spanPosition = 0; | 257 | newTween.tweenData.spanPosition = 0; |
250 | newTween.tweenData.tweenedProperties = []; | ||
251 | newTween.tweenData.tweenedProperties[this.trackEditorProperty] = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty); | ||
252 | 258 | ||
253 | this.propTweens.push(newTween); | 259 | this.propTweens.push(newTween); |
254 | 260 | ||
@@ -258,8 +264,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { | |||
258 | newTween.tweenData.keyFrameMillisec = currentMillisec; | 264 | newTween.tweenData.keyFrameMillisec = currentMillisec; |
259 | newTween.tweenData.tweenID = this.nextKeyframe; | 265 | newTween.tweenData.tweenID = this.nextKeyframe; |
260 | newTween.tweenData.spanPosition = clickPos - newTween.tweenData.spanWidth; | 266 | newTween.tweenData.spanPosition = clickPos - newTween.tweenData.spanWidth; |
261 | newTween.tweenData.tweenedProperties = []; | 267 | |
262 | newTween.tweenData.tweenedProperties[this.trackEditorProperty] = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty); | ||
263 | this.propTweens.push(newTween); | 268 | this.propTweens.push(newTween); |
264 | 269 | ||
265 | this.nextKeyframe += 1; | 270 | this.nextKeyframe += 1; |