From eb7c3c8db304bdfb01f747a50e932665d9ec03fa Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 14 May 2012 22:09:35 -0700 Subject: style keyframe rule addition Signed-off-by: Jonathan Duran --- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 25 +++++++++------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'js/panels/Timeline/TimelineTrack.reel') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 8b3938f4..0e40e222 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -321,6 +321,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } }, + animationNamesString:{ + value:"" + }, + ninjaStylesContoller:{ value:null }, @@ -468,14 +472,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.elementsList[0]; } } - - - - - - - - + // Drag and Drop: // Do we have a helper to append? if (this._appendHelper === true) { @@ -527,7 +524,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } } - if (this._isFirstDraw === true) { if (this.isMainCollapsed === false) { @@ -591,11 +587,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.tweens[i].tweenData = myObj; } - - } } }, + handleClick:{ value:function (ev) { // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span @@ -609,7 +604,9 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.updateKeyframeRule(); } else { this.handleNewTween(ev); - this.updateKeyframeRule(); + if (ev.target.className === "tracklane") { + this.updateKeyframeRule(); + } } } else { // TEMP error check @@ -626,7 +623,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.application.ninja.timeline.selectLayer(selectedIndex, false); this.insertTween(ev.offsetX); } else { - console.log(ev.target); this.splitTween(ev); } } @@ -792,6 +788,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.tweens[0].tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft; var animationDuration = Math.round(this.trackDuration / 1000) + "s"; this.animationName = this.animatedElement.classList[0] + "_PositionSize"; + this.animationNamesString = this.animationName; this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-name", this.animationName); this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-duration", animationDuration); this.ninjaStylesContoller.setElementStyle(this.animatedElement, "-webkit-animation-iteration-count", 1); @@ -900,8 +897,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { newStyleTrack.propTrackData.trackEditorProperty = ""; newStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; - console.log(layerEvent.styleIndex); - this.arrStyleTracks.push(newStyleTrack); } else if (layerEvent.layerEventType === "deleteStyle") { -- cgit v1.2.3