diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 22991a82..658ac043 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -141,6 +141,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
141 | } | 141 | } |
142 | } | 142 | } |
143 | }, | 143 | }, |
144 | |||
145 | handleChange: { | ||
146 | value: function() { | ||
147 | if(this.currentDocument && this.currentDocument.model.getProperty("domContainer")) { | ||
148 | this.currentSelectedContainer = this.currentDocument.model.getProperty("domContainer"); | ||
149 | } | ||
150 | } | ||
151 | }, | ||
144 | 152 | ||
145 | _currentSelectedContainer: { | 153 | _currentSelectedContainer: { |
146 | value: null | 154 | value: null |
@@ -213,7 +221,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
213 | }, | 221 | }, |
214 | set:function (newVal) { | 222 | set:function (newVal) { |
215 | this._layerRepetition = newVal; | 223 | this._layerRepetition = newVal; |
216 | }, | 224 | }, |
217 | serializable: true | 225 | serializable: true |
218 | }, | 226 | }, |
219 | 227 | ||
@@ -338,7 +346,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
338 | }, | 346 | }, |
339 | set:function (newVal) { | 347 | set:function (newVal) { |
340 | this._trackRepetition = newVal; | 348 | this._trackRepetition = newVal; |
341 | }, | 349 | }, |
342 | serializable: true | 350 | serializable: true |
343 | }, | 351 | }, |
344 | 352 | ||
@@ -495,13 +503,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
495 | this.tl_configbutton.addEventListener("click", this.handleConfigButtonClick.bind(this), false); | 503 | this.tl_configbutton.addEventListener("click", this.handleConfigButtonClick.bind(this), false); |
496 | document.addEventListener("click", this.handleDocumentClick.bind(this), false); | 504 | document.addEventListener("click", this.handleDocumentClick.bind(this), false); |
497 | 505 | ||
498 | 506 | this.addPropertyChangeListener("currentDocument.model.domContainer", this); | |
499 | // Bind some bindings | ||
500 | Object.defineBinding(this, "currentSelectedContainer", { | ||
501 | boundObject:this.application.ninja, | ||
502 | boundObjectPropertyPath:"currentSelectedContainer", | ||
503 | oneway:true | ||
504 | }); | ||
505 | 507 | ||
506 | } | 508 | } |
507 | }, | 509 | }, |
@@ -601,13 +603,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
601 | // Store the timeline data in currentDocument... | 603 | // Store the timeline data in currentDocument... |
602 | if (this._boolCacheArrays) { | 604 | if (this._boolCacheArrays) { |
603 | // ... but only if we're supposed to. | 605 | // ... but only if we're supposed to. |
604 | if(this.currentDocument) { | 606 | this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; |
605 | this.currentDocument.tlArrLayers = this.arrLayers; | 607 | this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; |
606 | this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; | 608 | this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; |
607 | this.currentDocument.tllayerNumber = this.currentLayerNumber; | 609 | this.application.ninja.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; |
608 | this.currentDocument.tlCurrentLayerSelected = this.currentLayerSelected; | 610 | this.application.ninja.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; |
609 | this.currentDocument.tlCurrentLayersSelected = this.currentLayersSelected; | ||
610 | } | ||
611 | } | 611 | } |
612 | } | 612 | } |
613 | }, | 613 | }, |
@@ -615,12 +615,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
615 | initTimelineCache: { | 615 | initTimelineCache: { |
616 | value: function() { | 616 | value: function() { |
617 | // Initialize the currentDocument for a new set of timeline data. | 617 | // Initialize the currentDocument for a new set of timeline data. |
618 | this.currentDocument.isTimelineInitialized = true; | 618 | this.application.ninja.currentDocument.isTimelineInitialized = true; |
619 | this.currentDocument.tlArrLayers = []; | 619 | this.application.ninja.currentDocument.tlArrLayers = []; |
620 | this.currentDocument.tlCurrentSelectedContainer = this.application.ninja.currentSelectedContainer; | 620 | this.application.ninja.currentDocument.tlCurrentSelectedContainer = this.currentDocument.model.domContainer; |
621 | this.currentDocument.tllayerNumber = this.currentLayerNumber; | 621 | this.application.ninja.currentDocument.tllayerNumber = this.currentLayerNumber; |
622 | this.currentDocument.tlCurrentLayerSelected = false; | 622 | this.application.ninja.currentDocument.tlCurrentLayerSelected = false; |
623 | this.currentDocument.tlCurrentLayersSelected = false; | 623 | this.application.ninja.currentDocument.tlCurrentLayersSelected = false; |
624 | } | 624 | } |
625 | }, | 625 | }, |
626 | 626 | ||
@@ -761,7 +761,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
761 | // console.log('TimelinePanel.initTimelineForDocument: breadCrumbClick'); | 761 | // console.log('TimelinePanel.initTimelineForDocument: breadCrumbClick'); |
762 | // Information stored, but we're moving up or down in the breadcrumb. | 762 | // Information stored, but we're moving up or down in the breadcrumb. |
763 | // Get the current selection and restore timeline info for its children. | 763 | // Get the current selection and restore timeline info for its children. |
764 | var parentNode = this.application.ninja.currentSelectedContainer, | 764 | var parentNode = this.currentDocument.model.domContainer, |
765 | storedCurrentLayerNumber = this.application.ninja.currentDocument.tllayerNumber; | 765 | storedCurrentLayerNumber = this.application.ninja.currentDocument.tllayerNumber; |
766 | this.temparrLayers = []; | 766 | this.temparrLayers = []; |
767 | 767 | ||
@@ -800,7 +800,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
800 | 800 | ||
801 | //debugger; | 801 | //debugger; |
802 | if (typeof(this.application.ninja.currentDocument.tlCurrentSelectedContainer) !== "undefined") { | 802 | if (typeof(this.application.ninja.currentDocument.tlCurrentSelectedContainer) !== "undefined") { |
803 | // this.application.ninja.currentSelectedContainer=this.application.ninja.currentDocument.tlCurrentSelectedContainer; | 803 | // this.currentDocument.model.domContainer = this.application.ninja.currentDocument.tlCurrentSelectedContainer; |
804 | } | 804 | } |
805 | 805 | ||
806 | // Are we only showing animated layers? | 806 | // Are we only showing animated layers? |
@@ -1076,7 +1076,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1076 | thingToPush.layerData.layerName = newLayerName; | 1076 | thingToPush.layerData.layerName = newLayerName; |
1077 | thingToPush.layerData.layerTag = "<" + object.nodeName.toLowerCase() + ">"; | 1077 | thingToPush.layerData.layerTag = "<" + object.nodeName.toLowerCase() + ">"; |
1078 | thingToPush.layerData.layerID = this.currentLayerNumber; | 1078 | thingToPush.layerData.layerID = this.currentLayerNumber; |
1079 | thingToPush.parentElement = this.application.ninja.currentSelectedContainer; | 1079 | thingToPush.parentElement = this.currentDocument.model.domContainer; |
1080 | thingToPush.layerData.isSelected = true; | 1080 | thingToPush.layerData.isSelected = true; |
1081 | thingToPush.layerData._isFirstDraw = true; | 1081 | thingToPush.layerData._isFirstDraw = true; |
1082 | thingToPush.layerData.created = true; | 1082 | thingToPush.layerData.created = true; |
@@ -1124,7 +1124,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1124 | thingToPush.layerData.layerName = newLayerName; | 1124 | thingToPush.layerData.layerName = newLayerName; |
1125 | thingToPush.layerData.layerID = this.currentLayerNumber; | 1125 | thingToPush.layerData.layerID = this.currentLayerNumber; |
1126 | thingToPush.layerData.layerTag = "<" + ele.nodeName.toLowerCase() + ">"; | 1126 | thingToPush.layerData.layerTag = "<" + ele.nodeName.toLowerCase() + ">"; |
1127 | thingToPush.parentElement = this.application.ninja.currentSelectedContainer; | 1127 | thingToPush.parentElement = this.currentDocument.model.domContainer; |
1128 | if (this.checkable_animated.classList.contains("checked")) { | 1128 | if (this.checkable_animated.classList.contains("checked")) { |
1129 | thingToPush.layerData.isVisible = false; | 1129 | thingToPush.layerData.isVisible = false; |
1130 | } | 1130 | } |