From 8986b9f78174b10790ad00e5a28122cb0879e5e3 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Thu, 7 Jun 2012 21:22:41 -0700 Subject: Sub property Signed-off-by: Kruti Shah --- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 8dc19958..457a85c0 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -431,6 +431,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.isStyleCollapsed = this.trackData.isStyleCollapsed; this.trackPosition = this.trackData.trackPosition; this.isVisible = this.trackData.isVisible; + this.trackEditorProperty = "master"; this.needsDraw = true; } }, @@ -901,15 +902,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { value:function(){ // create track objects for position and transform tracks and push into arrays - // create 'top' track - var newTopTrack = {}; - newTopTrack.propTrackData = {}; - newTopTrack.propTrackData.propTweens = []; - newTopTrack.propTrackData.styleIndex = 0; - newTopTrack.propTrackData.trackType = "position"; - newTopTrack.propTrackData.trackEditorProperty = "top"; - this.arrPositionTracks.push(newTopTrack); - // create 'left' track var newLeftTrack = {}; newLeftTrack.propTrackData = {}; @@ -919,6 +911,15 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { newLeftTrack.propTrackData.trackEditorProperty = "left"; this.arrPositionTracks.push(newLeftTrack); + // create 'top' track + var newTopTrack = {}; + newTopTrack.propTrackData = {}; + newTopTrack.propTrackData.propTweens = []; + newTopTrack.propTrackData.styleIndex = 0; + newTopTrack.propTrackData.trackType = "position"; + newTopTrack.propTrackData.trackEditorProperty = "top"; + this.arrPositionTracks.push(newTopTrack); + // create 'width' track var newWidthTrack = {}; newWidthTrack.propTrackData = {}; -- 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/TimelineTrack.js') 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/TimelineTrack.js') 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.js | 58 +++++++++++++++++++--- 1 file changed, 50 insertions(+), 8 deletions(-) (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 3b2b3fff..adad6ff3 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -11,10 +11,6 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { - hasTemplate:{ - value:true - }, - _trackID:{ value:null }, @@ -31,11 +27,21 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } } }, - - _isFirstDraw: { - value: true + + _tween:{ + value:[] }, - + + tween:{ + serializable:true, + get:function () { + return this._tween; + }, + set:function (newVal) { + this._tween = newVal; + } + }, + _isVisible:{ value: true }, @@ -345,15 +351,51 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { _positionCollapser:{ value:null }, + positionCollapser:{ + serializable:true, + get:function(){ + return this._positionCollapser; + }, + set:function(val){ + this._positionCollapser = val; + } + }, _mainCollapser:{ value:null }, + mainCollapser:{ + serializable:true, + get:function () { + return this._mainCollapser; + }, + set:function (val) { + this._mainCollapser = val; + } + }, _transformCollapser:{ value:null }, + transformCollapser:{ + serializable:true, + get:function () { + return this._transformCollapser; + }, + set:function (val) { + this._transformCollapser = val; + } + }, _styleCollapser:{ value:null }, + styleCollapser:{ + serializable:true, + get:function () { + return this._styleCollapser; + }, + set:function (val) { + this._styleCollapser = val; + } + }, // Drag and Drop properties _dragAndDropHelper : { -- cgit v1.2.3