From 0b899ad6cec5e4626dfa32230be7c04d22d4f820 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Wed, 18 Jul 2012 12:23:54 -0700 Subject: The zoom slider position remembered between multi doc switch Signed-off-by: Kruti Shah --- .../Timeline/TimelinePanel.reel/TimelinePanel.html | 3 ++- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index c287e68e..593b4ea1 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html @@ -63,7 +63,8 @@ POSSIBILITY OF SUCH DAMAGE. "tl_configbutton" : {"#" : "tl-configbutton"}, "checkable_lock" : {"#" : "checkable_lock"}, "checkable_visible":{"#" : "checkable_visible"}, - "play_button" : {"#" : "play_button"} + "play_button" : {"#" : "play_button"}, + "zoom_slider" : {"@" : "timelineZoomSlider"} } }, diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 6cc08cdf..05b9335a 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -511,7 +511,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { set:function (newVal) { if (newVal !== this._millisecondsOffset) { - this.tempValue = newVal; + this.zoomValue = newVal; var tempValue = (1/newVal) * 1000000; newVal = tempValue; @@ -1115,7 +1115,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected; this.currentElementsSelected = this.application.ninja.currentDocument.tlCurrentElementsSelected; this._currentDocumentUuid = this.application.ninja.currentDocument.uuid; - + this.millisecondsOffset = this.application.ninja.currentDocument.tlZoomSliderValue ; + this.zoom_slider.value = this.application.ninja.currentDocument.tlZoomSliderValue; // Are we only showing animated layers? if (this.application.ninja.currentDocument.boolShowOnlyAnimated) { @@ -1706,12 +1707,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { zoomTrackContainerWidthChange:{ value:function () { - this.tempValue = this.tempValue/1000; - this.tempValue *= 30; + if(this.application.ninja.currentDocument){ + this.application.ninja.currentDocument.tlZoomSliderValue = this.zoomValue; + + } + + this.zoomValue = this.zoomValue/1000; + this.zoomValue *= 30; - this.container_tracks.style.width = (this.tempValue * 80) + "px"; - this.master_track.style.width = (this.tempValue * 80) + "px"; - this.time_markers.style.width = (this.tempValue * 80) + "px"; + this.container_tracks.style.width = (this.zoomValue * 80) + "px"; + this.master_track.style.width = (this.zoomValue * 80) + "px"; + this.time_markers.style.width = (this.zoomValue * 80) + "px"; if (this.timeMarkerHolder) { this.time_markers.removeChild(this.timeMarkerHolder); } -- cgit v1.2.3 From 6431037185722a63064c2f2fb31fe0e325c9653a Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Thu, 19 Jul 2012 10:19:41 -0700 Subject: FIx 3D animation workflow Can now add 3D to any keyframe and all the tween will initialize their 3D identity matrices Signed-off-by: Jonathan Duran --- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 26 ++++++++++++++++++++++ js/panels/Timeline/Tween.reel/Tween.js | 4 ++++ 2 files changed, 30 insertions(+) (limited to 'js') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index f3ab0d84..56e5d2f1 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -354,6 +354,20 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } }, + _enabled3D:{ + value:false + }, + enabled3D:{ + serializable:true, + get:function () { + return this._enabled3D; + }, + set:function (val) { + this._enabled3D = val; + this.trackData.enabled3D = val; + } + }, + _ruleList:{ value:[] }, @@ -495,6 +509,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.trackPosition = this.trackData.trackPosition; this.isVisible = this.trackData.isVisible; this.stageElement = this.trackData.stageElement; + this.enabled3D = this.trackData.enabled3D; this.trackEditorProperty = "master"; this.needsDraw = true; } @@ -1087,6 +1102,17 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } }, + initial3DforAllTweens:{ + value:function(){ + var j; + var tweensLength = this.tweens.length; + for (j = 0; j < tweensLength; j++) { + this.tweens[j].tweenData.tweenedProperties["-webkit-transform"] = "perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)"; + } + this.enabled3D = true; + } + }, + addAnimationRuleToElement:{ value:function (tweenEvent) { this.tweens[0].tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px"; diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 0f567fbd..e3f9e71a 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -299,6 +299,10 @@ var Tween = exports.Tween = Montage.create(Component, { this.parentComponent.parentComponent.updateKeyframeRule(); this.isTweenAnimated = true; } + + if(!this.parentComponent.parentComponent.enabled3D){ + this.parentComponent.parentComponent.initial3DforAllTweens(); + } if (eventDetail.source === "translateTool" || eventDetail.source === "rotateTool") { var arrMat = eventDetail.data.value[0].properties.mat, -- cgit v1.2.3 From 7b7f4157dfd1d3ad2b4a266c92594da56a619254 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Thu, 19 Jul 2012 11:58:23 -0700 Subject: Improve keyframe selection by moving playhead marker to lower z-index Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css | 4 ++-- js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss | 2 +- js/panels/Timeline/Tween.reel/Tween.js | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css index f9f5e98c..201b530e 100644 --- a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css +++ b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css @@ -113,7 +113,7 @@ POSSIBILITY OF SUCH DAMAGE. .playhead { height: 14px; width: 6px; position: absolute; top: 6px; left: -3px; z-index: 92; background-color: #b50003; opacity: 0.5; visibility: hidden; } /* line 291, ../scss/TimelinePanel.scss */ -.playheadmarker { height: 100%; width: 1px; background-color: white; top: 0; left: 0; position: absolute; z-index: 91; opacity: 0.7; } +.playheadmarker { height: 100%; width: 1px; background-color: white; top: 0; left: 0; position: absolute; z-index: 1; opacity: 0.7; } /* line 301, ../scss/TimelinePanel.scss */ .timebar { height: 3px; width: 0; background-color: #ff0003; opacity: 0.3; top: 10px; position: absolute; border-top: #c7a19f thin solid; border-right: #ffffff thin solid; } @@ -165,7 +165,7 @@ POSSIBILITY OF SUCH DAMAGE. .tl_slider { width: 127px; height: 5px; float: left; clear: none; margin: 2px 0px 0px 0px; } /* line 409, ../scss/TimelinePanel.scss */ -.tl_slider .slider-track { background: #29292; width: 127px; height: 4px; border: 1px solid #000; top: 3px; } +.tl_slider .slider-track { background: #292929; width: 127px; height: 4px; border: 1px solid #000; top: 3px; } /* line 417, ../scss/TimelinePanel.scss */ .sliderClass { float: left; width: 127px; } diff --git a/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss b/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss index d2d813bb..b07c50b2 100644 --- a/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss +++ b/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss @@ -295,7 +295,7 @@ POSSIBILITY OF SUCH DAMAGE. top: 0; left: 0; position: absolute; - z-index: 91; + z-index: 1; opacity: 0.7; } .timebar{ diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index e3f9e71a..c9b59253 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -377,6 +377,12 @@ var Tween = exports.Tween = Montage.create(Component, { this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "left", [currentLeft], "Change", "tween"); this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "width", [currentWidth], "Change", "tween"); this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "height", [currentHeight], "Change", "tween"); + + if(this.parentComponent.parentComponent.enabled3D){ + var current3DMatrix = this.tweenedProperties["-webkit-transform"]; + this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.animatedElement], "-webkit-transform", [current3DMatrix], "Change", "tween"); + } + } } }, -- cgit v1.2.3 From 2805065a1f61241f25e1cf0d336dbb77d7e1dc01 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Fri, 20 Jul 2012 14:23:03 -0700 Subject: The zoom slider resets.Commented some code Signed-off-by: Kruti Shah --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index e037cccb..7581d15a 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1130,9 +1130,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.currentLayersSelected = this.application.ninja.currentDocument.tlCurrentLayersSelected; this.currentElementsSelected = this.application.ninja.currentDocument.tlCurrentElementsSelected; this._currentDocumentUuid = this.application.ninja.currentDocument.uuid; - this.millisecondsOffset = this.application.ninja.currentDocument.tlZoomSliderValue ; - this.zoom_slider.value = this.application.ninja.currentDocument.tlZoomSliderValue; - +// if(this.application.ninja.currentDocument.tlZoomSliderValue){ +// this.millisecondsOffset = this.application.ninja.currentDocument.tlZoomSliderValue ; +// if(this.zoom_slider){ +// this.zoom_slider.value = this.application.ninja.currentDocument.tlZoomSliderValue; +// } +// +// } // Are we only showing animated layers? if (this.application.ninja.currentDocument.boolShowOnlyAnimated) { // Fake a click. @@ -1707,7 +1711,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { zoomTrackContainerWidthChange:{ value:function () { - if(this.application.ninja.currentDocument){ + if(this.application.ninja.currentDocument && this.zoomValue){ this.application.ninja.currentDocument.tlZoomSliderValue = this.zoomValue; } @@ -1923,7 +1927,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { handleElementsRemoved:{ value:function (event) { - this.deleteLayers(event.detail); + + if(typeof(event.detail.length) === "undefined"){ + this.deleteLayers([event.detail]); + }else{ + this.deleteLayers(event.detail); + } } }, -- cgit v1.2.3