From aabd9b98341308cd0d276e6e788b7a3f9531c394 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 21 Jun 2012 11:32:20 -0700 Subject: Timeline: Bug Fix: Document switching was doubling position tracks. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 1 - 1 file changed, 1 deletion(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 89389469..b8ba5feb 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -595,7 +595,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { prepareForDraw:{ value:function () { this.initTimeline(); - } }, -- cgit v1.2.3 From 403d0834a23760c2481be050a8be925c1ba64a1b Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 21 Jun 2012 12:14:59 -0700 Subject: Timeline: Bug fix IKNINJA-1783, Timeline panel is disabled when CSS file is open in another tab. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index b8ba5feb..1ba9f067 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -118,9 +118,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { return; } - if(!this._currentDocument && value.currentView === "design") { - this.enablePanel(true); - } + // Should we enable the panel? + if (typeof(this._currentDocument) !== "undefined") { + // We have a document, or at least we have initialized the panel. + // What view are we in? + if (typeof(value) !== "undefined") { + if (value.currentView === "design") { + // We are in design view, so enable the panel. + this.enablePanel(true); + } + } + } this._currentDocument = value; @@ -893,7 +901,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.drawTimeMarkers(); // Document switching // Check to see if we have saved timeline information in the currentDocument. - //console.log("TimelinePanel.initTimelineForDocument"); + // console.log("TimelinePanel.initTimelineForDocument"); if ((typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined")) { // console.log('TimelinePanel.initTimelineForDocument: new Document'); -- cgit v1.2.3 From 2a9c33a46eb33bb4f25623217c781e9bf16221d9 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 21 Jun 2012 12:48:11 -0700 Subject: Timeline: Bug fix IKNINJA-1755 Can't insert keyframes in a CSS style property of an object on top layer --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 1ba9f067..c8caf50e 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1975,7 +1975,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { returnVal = false, arrLayersLength = this.arrLayers.length; for (i = 0; i < arrLayersLength; i++) { - if (this.arrLayers[i].isSelected === true) { + if (this.arrLayers[i].layerData.isSelected === true) { returnVal = i; } } -- cgit v1.2.3 From b154a6e287dcc2aec57e49ca569ee8004675eb42 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 21 Jun 2012 17:46:46 -0700 Subject: Timeline: Bug fix IKNINJA-1791 Double-clicking to go in a child level and coming back up to Body will collapse its layer and wipe out all the sub property keyframes. --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 50 ++++++++++++++++++---- 1 file changed, 41 insertions(+), 9 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index c8caf50e..96be66e8 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -733,11 +733,26 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { if (this._boolCacheArrays) { // ... but only if we're supposed to. if(this.currentDocument) { + var i = 0, + hashLength = this.application.ninja.currentDocument.tlBreadcrumbHash.length, + boolHash = false; + this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; + for (i = 0; i < hashLength; i++ ) { + if (this.application.ninja.currentDocument.tlBreadcrumbHash[i].containerUuid === this.currentDocument.model.domContainer.uuid) { + boolHash = true; + } + } + if (boolHash === false) { + var newHash = {}; + newHash.containerUuid = this.currentDocument.model.domContainer.uuid; + newHash.arrLayers = this.arrLayers; + this.application.ninja.currentDocument.tlBreadcrumbHash.push(newHash); + } } this.application.ninja.currentDocument.tlCurrentElementsSelected = this.currentElementsSelected; } @@ -754,6 +769,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.application.ninja.currentDocument.tlCurrentLayerSelected = false; this.application.ninja.currentDocument.tlCurrentLayersSelected = false; this.application.ninja.currentDocument.tlCurrentElementsSelected = []; + this.application.ninja.currentDocument.tlBreadcrumbHash = []; } }, @@ -934,20 +950,36 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { } else if (this.application.ninja.currentDocument.setLevel) { // console.log('TimelinePanel.initTimelineForDocument: breadCrumbClick'); // Information stored, but we're moving up or down in the breadcrumb. - // Get the current selection and restore timeline info for its children. - var parentNode = this.currentDocument.model.domContainer, + + var i = 0, + hash = this.application.ninja.currentDocument.tlBreadcrumbHash, + hashLength = hash.length, + boolHashed = false, + parentNode = this.currentDocument.model.domContainer, storedCurrentLayerNumber = this.application.ninja.currentDocument.tllayerNumber; - this.temparrLayers = []; - - for (myIndex = 0; parentNode.children[myIndex]; myIndex++) { - this._openDoc = true; - this.restoreLayer(parentNode.children[myIndex]); - - } + this.temparrLayers = []; + + // It's possible there is something stored in the breadcrumb hash in currentdocument, so check there first. + for (i = 0; i < hashLength; i++ ) { + if (hash[i].containerUuid === this.currentDocument.model.domContainer.uuid) { + this.temparrLayers = hash[i].arrLayers + boolHashed = true; + } + } + + // Possibly nothing was in the hash, so check and if so fall back to old restoreLayer method. + if (boolHashed === false) { + for (myIndex = 0; parentNode.children[myIndex]; myIndex++) { + this._openDoc = true; + this.restoreLayer(parentNode.children[myIndex]); + } + } + // Draw the repetition. this.arrLayers = this.temparrLayers; this.currentLayerNumber = storedCurrentLayerNumber; this.application.ninja.currentDocument.setLevel = false; + this.resetMasterDuration(); } else { // console.log('TimelinePanel.initTimelineForDocument: else fallback'); -- cgit v1.2.3 From fff4cd20a23b95519333daec564f309be7d7d4ec Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 21 Jun 2012 18:01:39 -0700 Subject: Timeline: Bug fix: When creating a new file, Timeline was disabled. (Injection from fix of IKNINJA-1783) --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 48 ++++++++++++---------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 96be66e8..0d0be721 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -117,36 +117,42 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { if (value === this._currentDocument) { return; } - + this._currentDocument = value; + + var boolDoc = false, + boolView = false; + // Should we enable the panel? + // Only if we have both a document and we're in design view. + if (typeof(value) !== "undefined") { + if (value.currentView === "design") { + // We are in design view. + boolView = true; + } + } if (typeof(this._currentDocument) !== "undefined") { // We have a document, or at least we have initialized the panel. - // What view are we in? - if (typeof(value) !== "undefined") { - if (value.currentView === "design") { - // We are in design view, so enable the panel. - this.enablePanel(true); - } - } + boolDoc = true; } - this._currentDocument = value; - - if(!value) { + if(boolDoc === false) { this._boolCacheArrays = false; this.clearTimelinePanel(); this._boolCacheArrays = true; this.enablePanel(false); - } else if(this._currentDocument.currentView === "design") { - this._boolCacheArrays = false; - this.clearTimelinePanel(); - this._boolCacheArrays = true; - - // Rebind the document events for the new document context - this._bindDocumentEvents(); - - // Initialize the timeline for the document. - this.initTimelineForDocument(); + } else { + if(boolView === true) { + this._boolCacheArrays = false; + this.clearTimelinePanel(); + this._boolCacheArrays = true; + + // Rebind the document events for the new document context + this._bindDocumentEvents(); + + // Initialize the timeline for the document. + this.initTimelineForDocument(); + this.enablePanel(true); + } } } }, -- cgit v1.2.3 From 82638621ed793fcb37438798363dba151efd9cd2 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 21 Jun 2012 23:27:15 -0700 Subject: Timeline: Breadcrumb hash in currentDocument will now update as changes are made to the DOM. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 1 + 1 file changed, 1 insertion(+) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 0d0be721..29d19c4f 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -750,6 +750,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; for (i = 0; i < hashLength; i++ ) { if (this.application.ninja.currentDocument.tlBreadcrumbHash[i].containerUuid === this.currentDocument.model.domContainer.uuid) { + this.application.ninja.currentDocument.tlBreadcrumbHash[i].arrLayers = this.arrLayers; boolHash = true; } } -- cgit v1.2.3 From d021013f6ffb691127229116ed961cb5f4acaf2c Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Mon, 25 Jun 2012 11:59:50 -0700 Subject: Timeline: CSS fixes. --- .../TimelinePanel.reel/css/TimelinePanel.css | 36 +++++++++++----------- .../TimelinePanel.reel/scss/TimelinePanel.scss | 3 +- 2 files changed, 20 insertions(+), 19 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css index 7f61074e..6daedde8 100644 --- a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css +++ b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css @@ -86,53 +86,53 @@ .timemark { font-family: 'Droid Sans'; font-size: 12px; text-shadow: 1px 1px 1px #3a3a3a; width: 76px; color: gray; float: left; padding-top: 6px; padding-left: 4px; text-align: left; } /* line 255, ../scss/TimelinePanel.scss */ -.playhead { height: 14px; width: 6px; position: absolute; top: 6px; left: -3px; z-index: 92; background-color: #b50003; opacity: 0.5; } +.playhead { height: 14px; width: 6px; position: absolute; top: 6px; left: -3px; z-index: 92; background-color: #b50003; opacity: 0.5; visibility: hidden; } -/* line 265, ../scss/TimelinePanel.scss */ +/* line 266, ../scss/TimelinePanel.scss */ .playheadmarker { height: 100%; width: 1px; background-color: white; top: 0; left: 0; position: absolute; z-index: 91; opacity: 0.7; } -/* line 275, ../scss/TimelinePanel.scss */ +/* line 276, ../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; } -/* line 285, ../scss/TimelinePanel.scss */ -.endhottext { float: right; font-family: 'Droid Sans'; font-size: 12px; text-shadow: 1px 1px 1px #3a3a3a; color: white; margin-top: 0%; } +/* line 286, ../scss/TimelinePanel.scss */ +.timelinegutter .endhottext { float: right; font-family: 'Droid Sans'; font-size: 12px; text-shadow: 1px 1px 1px #3a3a3a; color: white; margin-top: 0%; } -/* line 293, ../scss/TimelinePanel.scss */ +/* line 294, ../scss/TimelinePanel.scss */ .timeline-disabled { position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-color: rgba(30, 30, 30, 0.796); z-index: 100; display: none; box-shadow: #111111 0px 0px 14px inset; } -/* line 304, ../scss/TimelinePanel.scss */ +/* line 305, ../scss/TimelinePanel.scss */ .timeline-dnd-helper { -webkit-transform: scale(0.9, 0.9); } -/* line 307, ../scss/TimelinePanel.scss */ +/* line 308, ../scss/TimelinePanel.scss */ .tl_slider { width: 65px; height: 5px; background: none; float: left; margin-left: 5%; visibility: hidden; } /* Configuration menu */ -/* line 317, ../scss/TimelinePanel.scss */ +/* line 318, ../scss/TimelinePanel.scss */ .layer-master { position: relative; } -/* line 320, ../scss/TimelinePanel.scss */ +/* line 321, ../scss/TimelinePanel.scss */ .tl-configbutton { position: absolute; top: 0px; right: 2px; width: 20px; height: 20px; background-image: url(../images/icon-gear.png); background-repeat: no-repeat; cursor: pointer; z-index: 100; background-position: 100% 0px; } -/* line 332, ../scss/TimelinePanel.scss */ +/* line 333, ../scss/TimelinePanel.scss */ .tl-configbutton:hover { width: 180px; } -/* line 336, ../scss/TimelinePanel.scss */ +/* line 337, ../scss/TimelinePanel.scss */ .tl-configbutton .tl-dropdown { position: absolute; border: 1px solid black; top: 16px; right: 2px; width: 180px; padding-bottom: 7px; background-color: #474747; box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5); display: none; } -/* line 347, ../scss/TimelinePanel.scss */ +/* line 348, ../scss/TimelinePanel.scss */ .tl-configbutton.checked .tl-dropdown { display: block; } -/* line 351, ../scss/TimelinePanel.scss */ +/* line 352, ../scss/TimelinePanel.scss */ .tl-configbutton .checkable { padding-left: 20px; height: 20px; line-height: 20px; margin-top: 3px; } -/* line 357, ../scss/TimelinePanel.scss */ +/* line 358, ../scss/TimelinePanel.scss */ .tl-configbutton .checkable:hover { background-color: #b2b2b2; color: #242424; text-shadow: none; } -/* line 362, ../scss/TimelinePanel.scss */ +/* line 363, ../scss/TimelinePanel.scss */ .tl-configbutton .checkable.checked { background-image: url(../images/icon-checkmark.png); background-repeat: no-repeat; background-position: 6px 4px; } -/* line 368, ../scss/TimelinePanel.scss */ +/* line 369, ../scss/TimelinePanel.scss */ .tl-configbutton .nj-divider { margin-top: 7px; } -/* line 372, ../scss/TimelinePanel.scss */ +/* line 373, ../scss/TimelinePanel.scss */ .layer-hidden { display: none; } diff --git a/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss b/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss index d4789d65..86e22779 100644 --- a/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss +++ b/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss @@ -261,6 +261,7 @@ z-index: 92; background-color: #b50003; opacity: 0.5; + visibility: hidden; } .playheadmarker{ height: 100%; @@ -282,7 +283,7 @@ border-top: #c7a19f thin solid; border-right: #ffffff thin solid; } -.endhottext{ +.timelinegutter .endhottext{ float: right; font-family: 'Droid Sans'; font-size: 12px; -- cgit v1.2.3 From 874c3f17deb946a576d2cbefffe189e51ca7cb9a Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Mon, 25 Jun 2012 16:59:40 -0700 Subject: Timeline: bug fix: command-click now works for multi selecting layers on Macs. Also disabled control-click on macs. --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index e613d4d7..470062ba 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1401,27 +1401,43 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { timelineLeftPaneKeydown: { value: function(event) { + var ua = navigator.userAgent.toLowerCase(), + boolIsMac = false; + if (ua.indexOf("mac") > -1) { + boolIsMac = true; + } if (event.keyCode === 16) { // Shift key has been pressed this._isShiftPressed = true; } - if (event.keyCode === 17) { + if ((event.keyCode === 17) && !boolIsMac) { // Control key has been pressed this._isControlPressed = true; } + if (event.metaKey === true) { + this._isControlPressed = true; + } } }, timelineLeftPaneKeyup: { value: function(event) { + var ua = navigator.userAgent.toLowerCase(), + boolIsMac = false; + if (ua.indexOf("mac") > -1) { + boolIsMac = true; + } if (event.keyCode === 16) { // Shift key has been released this._isShiftPressed = false; } - if (event.keyCode === 17) { + if ((event.keyCode === 17) && !boolIsMac) { // Control key has been released this._isControlPressed = false; } + if (event.metaKey === false) { + this._isControlPressed = false; + } } }, createstageElement:{ -- cgit v1.2.3 From 390e5f7e3ba41ef0c71d1f944d926f9eee0c8846 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 26 Jun 2012 12:34:30 -0700 Subject: Timeline: Bug fix IKNINJA-1816 --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 470062ba..ceb37db6 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -243,6 +243,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { value: false }, + _areTracksCollapsing: { + value: false + }, + _currentOpenSpanMenu: { value: false }, @@ -687,6 +691,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // We have shuffled layers, so we need to update this.selectedLayers. this.selectLayers([]) } + + // Do we need to scroll the layers? + if (this._areTracksCollapsing !== false) { + //console.log("diddraw: user_layers, layout_tracks", this.user_layers.scrollTop, this.layout_tracks.scrollTop); + //this.layout_tracks.scrollTop = this.user_layers.scrollTop;\ + this.layout_tracks.scrollTop = this._areTracksCollapsing; + this._areTracksCollapsing = false; + } } }, @@ -1097,11 +1109,25 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.drawTimeMarkers(); } }, + + synchScrollbars: { + value: function(intScrollBy) { + //this.updateLayerScroll(); + //this.user_layers.scrollTop = 0; + //this.layout_tracks.scrollTop = this.user_layers.scrollTop; + //console.log("synch: user_layers, layout_tracks", this.user_layers.scrollTop, this.layout_tracks.scrollTop); + this._areTracksCollapsing = this.layout_tracks.scrollTop - intScrollBy; + this.needsDraw = true; + + } + }, updateLayerScroll:{ value:function () { + //console.log("TimelinePanel.updateLayerScroll") this._areTracksScrolling = true; this.needsDraw = true; + } }, -- cgit v1.2.3 From df6e43cea10a0c976390017ba41c33f74c4b7692 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 26 Jun 2012 13:38:57 -0700 Subject: Fix - deselect tweens when selecting a layer Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 470062ba..040ae7be 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1188,6 +1188,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { if (this.currentLayersSelected !== false) { this.currentLayersSelected = false; } + + // Deselect any tweens + this.deselectTweens(); // If we are actually going to be selecting things, create an empty array to use if (arrSelectedIndexesLength > 0) { -- cgit v1.2.3 From ab9d14780eed98f39786fae4518e69861b34bad7 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Tue, 26 Jun 2012 14:56:58 -0700 Subject: Timeline: Bug fix: Keyboard shortcut now works for adding keyframes, including splitting tweens. --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 34 +++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index ceb37db6..3f1af281 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1090,10 +1090,36 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { var tempEv = {}; tempEv.offsetX = this.playheadmarker.offsetLeft; tempEv.actionType = action; - if (typeof(this.trackRepetition.childComponents[this.currentLayersSelected[0]]) !== "undefined") { - this.trackRepetition.childComponents[this.currentLayersSelected[0]].handleKeyboardShortcut(tempEv); - } else { - // oops, we do not have a layer selected. We should growl at the user. For now, this will fail silently. + + if (this.currentLayersSelected === false) { + // oops, we do not have a layer selected. We should growl at the user. For now, this will fail silently. + return; + } + + // Okay. We need to get the correct layer(s). For each currentElementSelected, + // loop through trackRepetition.childComponents and compare to stageElement. + // If they match, that's one of the components that needs the event. + var i = 0, + j = 0, + currentElementsSelectedLength = this.currentElementsSelected.length, + trackRepLength = this.trackRepetition.childComponents.length, + arrTargetIndexes = [], + arrTargetIndexesLength = 0; + + + for (i = 0; i < trackRepLength; i++) { + var currentElement = this.trackRepetition.childComponents[i].stageElement; + for (j = 0; j < currentElementsSelectedLength; j++) { + if (currentElement === this.currentElementsSelected[j]) { + arrTargetIndexes.push(i); + } + } + } + arrTargetIndexesLength = arrTargetIndexes.length; + + // Now we have an array of things that need to handle the event. + for (i = 0; i < arrTargetIndexesLength; i++) { + this.trackRepetition.childComponents[arrTargetIndexes[i]].handleKeyboardShortcut(tempEv); } } }, -- cgit v1.2.3 From 9cefcd17e5b1943685130553f6a4f62179df8936 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 26 Jun 2012 17:48:31 -0700 Subject: FIx - hook up play button in timeline to live preview Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 6 ++---- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index eac361a8..f6fae9b8 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html @@ -37,7 +37,8 @@ "checkable_animated" : {"#" : "checkable_animated"}, "tl_configbutton" : {"#" : "tl-configbutton"}, "checkable_lock" : {"#" : "checkable_lock"}, - "checkable_visible":{"#" : "checkable_visible"} + "checkable_visible":{"#" : "checkable_visible"}, + "play_button" : {"#" : "play_button"} } }, @@ -164,10 +165,7 @@
-
-
-
00:00:00
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index af358468..12b481de 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -910,6 +910,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.eventManager.addEventListener("updatedID", this.handleLayerIdUpdate.bind(this), false); this.checkable_lock.addEventListener("click",this.handleLockLayerClick.bind(this),false); this.checkable_visible.addEventListener("click",this.handleLayerVisibleClick.bind(this),false); + this.play_button.addEventListener("click", this.handlePlayButtonClick.bind(this), false); this.addPropertyChangeListener("currentDocument.model.domContainer", this); @@ -1085,6 +1086,21 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { } }, + handlePlayButtonClick:{ + value:function(ev){ + this.application.ninja.appModel.livePreview = !this.application.ninja.appModel.livePreview; + + if (this.application.ninja.appModel.livePreview) { + this.play_button.classList.remove("playbutton"); + this.play_button.classList.add("pausebutton"); + + } else { + this.play_button.classList.remove("pausebutton"); + this.play_button.classList.add("playbutton"); + } + } + }, + handleKeyframeShortcut:{ value:function(action){ var tempEv = {}; -- cgit v1.2.3 From f57b0fe3640dbb4aa2e355d165225bc267c134c2 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Wed, 27 Jun 2012 12:40:22 -0700 Subject: Bug Fix : PI changes in Position updates the hottest in timeline & Keyframes deselection help apply style property Signed-off-by: Kruti Shah --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 12b481de..50171260 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1215,8 +1215,24 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { boolContinue = false, arrSelectedLayers = false, arrCurrentElementsSelected = []; + var matchedValues = 0; + + for(i=0;i 0) { -- cgit v1.2.3