diff options
author | Jon Reid | 2012-05-01 15:28:05 -0700 |
---|---|---|
committer | Jon Reid | 2012-05-01 15:28:05 -0700 |
commit | 8c1fda5e59b9d88b69e0b4a2bd57590ef451643c (patch) | |
tree | e055136fbf5ae15373970120c1fc7acdaae4f68c /js/panels | |
parent | b4975bc0e45783111a1d4efe69a7cc7ac3c72ef0 (diff) | |
download | ninja-8c1fda5e59b9d88b69e0b4a2bd57590ef451643c.tar.gz |
Timeline: Expand/collapse state of layers now mantained across document
switching.
Diffstat (limited to 'js/panels')
-rw-r--r-- | js/panels/Timeline/Collapser.js | 2 | ||||
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 31 | ||||
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 32 |
3 files changed, 62 insertions, 3 deletions
diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js index 88314c8b..9c8d4434 100644 --- a/js/panels/Timeline/Collapser.js +++ b/js/panels/Timeline/Collapser.js | |||
@@ -151,7 +151,6 @@ var Montage = require("montage/core/core").Montage, | |||
151 | 151 | ||
152 | // isToggling: Bindable property. Set this (to anything) to trigger a toggle. | 152 | // isToggling: Bindable property. Set this (to anything) to trigger a toggle. |
153 | _isToggling: { | 153 | _isToggling: { |
154 | serializable: true, | ||
155 | value: true | 154 | value: true |
156 | }, | 155 | }, |
157 | isToggling: { | 156 | isToggling: { |
@@ -179,7 +178,6 @@ var Montage = require("montage/core/core").Montage, | |||
179 | 178 | ||
180 | prepareForDraw: { | 179 | prepareForDraw: { |
181 | value: function() { | 180 | value: function() { |
182 | |||
183 | // Get the original value of the overflow property: | 181 | // Get the original value of the overflow property: |
184 | this._origOverflowValue = window.getComputedStyle(this.myContent, null).getPropertyValue("overflow"); | 182 | this._origOverflowValue = window.getComputedStyle(this.myContent, null).getPropertyValue("overflow"); |
185 | if (this.isCollapsed === false) { | 183 | if (this.isCollapsed === false) { |
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index b23da749..34c300df 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -471,7 +471,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
471 | this.dtextScaleX = this.layerData.dtextScaleX; | 471 | this.dtextScaleX = this.layerData.dtextScaleX; |
472 | this.dtextScaleY = this.layerData.dtextScaleY; | 472 | this.dtextScaleY = this.layerData.dtextScaleY; |
473 | this.dtextRotate = this.layerData.dtextRotate; | 473 | this.dtextRotate = this.layerData.dtextRotate; |
474 | this._isFirstDraw = this.layerData._isFirstDraw; | 474 | //this._isFirstDraw = this.layerData._isFirstDraw; |
475 | this.layerTag = this.layerData.layerTag; | 475 | this.layerTag = this.layerData.layerTag; |
476 | this.isVisible = this.layerData.isVisible; | 476 | this.isVisible = this.layerData.isVisible; |
477 | this.isAnimated = this.layerData.isAnimated; | 477 | this.isAnimated = this.layerData.isAnimated; |
@@ -545,6 +545,9 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
545 | this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); | 545 | this.element.addEventListener("dragleave", this.handleDragleave.bind(this), false); |
546 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); | 546 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); |
547 | this.element.addEventListener("drop", this.handleDrop.bind(this), false); | 547 | this.element.addEventListener("drop", this.handleDrop.bind(this), false); |
548 | |||
549 | |||
550 | |||
548 | } | 551 | } |
549 | }, | 552 | }, |
550 | draw: { | 553 | draw: { |
@@ -570,7 +573,33 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
570 | } | 573 | } |
571 | this._isFirstDraw = false; | 574 | this._isFirstDraw = false; |
572 | this.layerData._isFirstDraw = false; | 575 | this.layerData._isFirstDraw = false; |
576 | |||
577 | if (this.isMainCollapsed === false) { | ||
578 | this.mainCollapser.myContent.style.height = "auto"; | ||
579 | this.mainCollapser.myContent.classList.remove(this.mainCollapser.collapsedClass); | ||
580 | this.mainCollapser.clicker.classList.remove(this.mainCollapser.collapsedClass); | ||
581 | |||
582 | } | ||
583 | if (this.isPositionCollapsed === false) { | ||
584 | this.positionCollapser.myContent.style.height = "auto"; | ||
585 | this.positionCollapser.myContent.classList.remove(this.positionCollapser.collapsedClass); | ||
586 | this.positionCollapser.clicker.classList.remove(this.positionCollapser.collapsedClass); | ||
587 | } | ||
588 | if (this.isTransformCollapsed === false) { | ||
589 | this.transformCollapser.myContent.style.height = "auto"; | ||
590 | this.transformCollapser.myContent.classList.remove(this.transformCollapser.collapsedClass); | ||
591 | this.transformCollapser.clicker.classList.remove(this.transformCollapser.collapsedClass); | ||
592 | } | ||
593 | if (this.isStyleCollapsed === false) { | ||
594 | this.styleCollapser.myContent.style.height = "auto"; | ||
595 | this.styleCollapser.myContent.classList.remove(this.styleCollapser.collapsedClass); | ||
596 | this.styleCollapser.clicker.classList.remove(this.styleCollapser.collapsedClass); | ||
597 | } | ||
598 | |||
573 | } | 599 | } |
600 | |||
601 | |||
602 | |||
574 | } | 603 | } |
575 | }, | 604 | }, |
576 | /* End: Draw cycle */ | 605 | /* End: Draw cycle */ |
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index efeeba00..f32592ed 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -31,6 +31,11 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
31 | } | 31 | } |
32 | } | 32 | } |
33 | }, | 33 | }, |
34 | |||
35 | _isFirstDraw: { | ||
36 | value: true | ||
37 | }, | ||
38 | |||
34 | _isVisible:{ | 39 | _isVisible:{ |
35 | value: true | 40 | value: true |
36 | }, | 41 | }, |
@@ -448,6 +453,33 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
448 | } | 453 | } |
449 | } | 454 | } |
450 | } | 455 | } |
456 | |||
457 | |||
458 | if (this._isFirstDraw === true) { | ||
459 | |||
460 | if (this.isMainCollapsed === false) { | ||
461 | this._mainCollapser.myContent.style.height = "auto"; | ||
462 | this._mainCollapser.myContent.classList.remove(this._mainCollapser.collapsedClass); | ||
463 | this._mainCollapser.clicker.classList.remove(this._mainCollapser.collapsedClass); | ||
464 | } | ||
465 | if (this.isPositionCollapsed === false) { | ||
466 | this._positionCollapser.myContent.style.height = "auto"; | ||
467 | this._positionCollapser.myContent.classList.remove(this._positionCollapser.collapsedClass); | ||
468 | this._positionCollapser.clicker.classList.remove(this._positionCollapser.collapsedClass); | ||
469 | } | ||
470 | if (this.isTransformCollapsed === false) { | ||
471 | this._transformCollapser.myContent.style.height = "auto"; | ||
472 | this._transformCollapser.myContent.classList.remove(this._transformCollapser.collapsedClass); | ||
473 | this._transformCollapser.clicker.classList.remove(this._transformCollapser.collapsedClass); | ||
474 | } | ||
475 | if (this.isStyleCollapsed === false) { | ||
476 | this._styleCollapser.myContent.style.height = "auto"; | ||
477 | this._styleCollapser.myContent.classList.remove(this._styleCollapser.collapsedClass); | ||
478 | this._styleCollapser.clicker.classList.remove(this._styleCollapser.collapsedClass); | ||
479 | } | ||
480 | this._isFirstDraw = false; | ||
481 | } | ||
482 | |||
451 | } | 483 | } |
452 | }, | 484 | }, |
453 | 485 | ||