From 4c3aac5eabd93052b1554a03d78235215bb49db4 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 29 May 2012 00:34:40 -0700 Subject: document bindings phase 1 - using array controller to bind the current document to all ninja components - removed open document event - removed references to the document controller Signed-off-by: Valerio Virgillito --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 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 ff684446..126e6a61 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -564,7 +564,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.nextKeyframe += 1; } - this.application.ninja.documentController.activeDocument.model.needsSave = true; + this.application.ninja.currentDocument.model.needsSave = true; } }, @@ -683,7 +683,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { keyframeString += " }"; // set the keyframe string as the new rule this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString); - this.application.ninja.documentController.activeDocument.model.needsSave = true; + this.application.ninja.currentDocument.model.needsSave = true; } }, -- cgit v1.2.3 From 66007a04da84cae1d81af5340b11706d5f25c89d Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 31 May 2012 17:09:45 -0700 Subject: Timeline: Bug fixes for deleting styles and their associated tracks correctly. --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 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 8dc19958..6b66bda9 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -969,8 +969,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.arrStyleTracks.push(restoredStyleTrack); } else if (layerEvent.layerEventType === "deleteStyle") { - // TODO: Delete the right track. Index can be passed in event object, use that for splice(). - this.arrStyleTracks.pop(); + // We are deleting a style, so delete the associated track + this.arrStyleTracks.splice(layerEvent._event.selectedStyleIndex, 1); } } }, -- cgit v1.2.3 From 08552f055117908beb469cf53a5d65803c603b49 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 5 Jun 2012 14:13:17 -0700 Subject: Fix error when opening file with no animations Signed-off-by: Jonathan Duran --- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 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 ae6ff114..0bd4b674 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -739,19 +739,18 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.animatedElement = this.application.ninja.timeline.arrLayers[selectedIndex].layerData.stageElement; if(this.animatedElement!==undefined){ this.animationName = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-name"); - - // check for multiple animation names - var animationNameList = this.animationName.split(","); - if(animationNameList.length > 1){ - this.animationNamesString = this.animationName; - this.animationName = animationNameList[0]; - this.getAllAnimationRules(animationNameList); - } else { - this.animationNamesString = this.animationName; - } - // build tweens for this tracks's keyframe rule if(this.animationName){ + // check for multiple animation names + var animationNameList = this.animationName.split(","); + if (animationNameList.length > 1) { + this.animationNamesString = this.animationName; + this.animationName = animationNameList[0]; + this.getAllAnimationRules(animationNameList); + } else { + this.animationNamesString = this.animationName; + } + trackTiming = this.application.ninja.stylesController.getElementStyle(this.animatedElement, "-webkit-animation-duration"); this.nextKeyframe = 0; -- cgit v1.2.3 From b73cc6e348f3eb4cd57b5afeb7a6f5d3633b7e6b Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 6 Jun 2012 11:05:02 -0700 Subject: Fix references to documentController.activeDocument to currentDocument.model Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 0bd4b674..bd55f2fb 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -725,7 +725,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { break; } } - this.application.ninja.documentController.activeDocument.needsSave = true; + this.application.ninja.currentDocument.model.needsSave = true; } }, -- cgit v1.2.3 From 79cbc26904a7fbd7a846f48da6c026a91221ba93 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 11 Jun 2012 10:11:15 -0700 Subject: changes to reopen sub property functions Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 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 bd55f2fb..efaf7aa8 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -829,14 +829,12 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { recreatePropertyTracks:{ value:function(ruleSet){ - - for(var i in ruleSet){ var styleProp = ruleSet[i][0].style[0]; console.log(styleProp); - this.application.ninja.timeline.layerRepetition.childComponents[0].addStyle(styleProp); + console.log(ruleSet[i]); + this.application.ninja.timeline.layerRepetition.childComponents[0].addStyle(styleProp, ruleSet[i]); } - } }, @@ -881,8 +879,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { keyframeString += keyframePropertyString; } keyframeString += " }"; + //console.log(keyframeString); // set the keyframe string as the new rule this.currentKeyframeRule = this.ninjaStylesContoller.addRule(keyframeString); + //console.log(this.currentKeyframeRule); this.application.ninja.currentDocument.model.needsSave = true; } }, @@ -944,8 +944,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { return; } if (layerEvent.layerEventType === "newStyle") { - // TODO: Add a real track of tweens. Probably need a method for that. - var newStyleTrack = {}; newStyleTrack.propTrackData = {}; newStyleTrack.propTrackData.styleSelection = layerEvent.styleSelection; @@ -953,6 +951,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { newStyleTrack.propTrackData.trackType = "style"; newStyleTrack.propTrackData.trackEditorProperty = ""; newStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; + newStyleTrack.propTrackData.existingRule = ""; this.arrStyleTracks.push(newStyleTrack); @@ -964,6 +963,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { restoredStyleTrack.propTrackData.trackType = "style"; restoredStyleTrack.propTrackData.trackEditorProperty = layerEvent.trackEditorProperty; restoredStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; + restoredStyleTrack.propTrackData.existingRule = layerEvent.existingRule; this.arrStyleTracks.push(restoredStyleTrack); } -- cgit v1.2.3 From f555dbb070dae53bf81f49d148d59f0a32726811 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 12 Jun 2012 08:33:14 -0700 Subject: remove some console logs and simply the prop tween retrieval conditions Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 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 efaf7aa8..3b2b3fff 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -831,8 +831,8 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { value:function(ruleSet){ for(var i in ruleSet){ var styleProp = ruleSet[i][0].style[0]; - console.log(styleProp); - console.log(ruleSet[i]); + //console.log(styleProp); + //console.log(ruleSet[i]); this.application.ninja.timeline.layerRepetition.childComponents[0].addStyle(styleProp, ruleSet[i]); } } -- cgit v1.2.3 From 03478f396977973f95977cf21c98bf6a2fa26721 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 12 Jun 2012 11:18:43 -0700 Subject: montage v10 serialization updates for timeline Signed-off-by: Jonathan Duran Conflicts: js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js Signed-off-by: Jonathan Duran --- .../Timeline/TimelineTrack.reel/TimelineTrack.html | 9 ++-- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 58 +++++++++++++++++++--- 2 files changed, 55 insertions(+), 12 deletions(-) (limited to 'js/panels/Timeline/TimelineTrack.reel') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index 0d7f517f..8c550f00 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html @@ -1,4 +1,4 @@ - +