aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
diff options
context:
space:
mode:
authorJon Reid2012-03-01 12:01:44 -0800
committerJon Reid2012-03-01 12:01:44 -0800
commit4a4b4e69ce101b22a85d16ece2dd8034c242654c (patch)
treedb17d8f1c629753a23ab9e9d45a16ccd48896363 /js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
parenta725643eba157b3c37d9acd13c6fdd48379bb0df (diff)
downloadninja-4a4b4e69ce101b22a85d16ece2dd8034c242654c.tar.gz
Timeline: efficiency improvements to collapser. Document switching.
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js')
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 90b685dc..4a3d7a44 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -589,55 +589,54 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
589 this._mainCollapser.myContent = this.myContent; 589 this._mainCollapser.myContent = this.myContent;
590 this._mainCollapser.contentHeight = 60; 590 this._mainCollapser.contentHeight = 60;
591 this._mainCollapser.isLabelClickable = false; 591 this._mainCollapser.isLabelClickable = false;
592 this._mainCollapser.element = this.element; 592 this._mainCollapser.element = this.myContent;
593 this._mainCollapser.isCollapsed = this.isMainCollapsed; 593 this._mainCollapser.isCollapsed = this.isMainCollapsed;
594 this._mainCollapser.isAnimated = true; 594 this._mainCollapser.isAnimated = true;
595 this._mainCollapser.labelClickEvent = function () { 595 this._mainCollapser.labelClickEvent = function () {
596 that.isMainCollapsed = that._mainCollapser.isCollapsed; 596 that.isMainCollapsed = that._mainCollapser.isCollapsed;
597 }; 597 };
598 this._mainCollapser.needsDraw = true; 598 //this._mainCollapser.needsDraw = true;
599 599
600 this._positionCollapser = Collapser.create(); 600 this._positionCollapser = Collapser.create();
601 this._positionCollapser.clicker = this.labelPosition; 601 this._positionCollapser.clicker = this.labelPosition;
602 this._positionCollapser.myContent = this.contentPosition; 602 this._positionCollapser.myContent = this.contentPosition;
603 this._positionCollapser.contentHeight = 60; 603 this._positionCollapser.contentHeight = 40;
604 this._positionCollapser.isLabelClickable = true; 604 this._positionCollapser.isLabelClickable = true;
605 this._positionCollapser.element = this.element; 605 this._positionCollapser.element = this.contentPosition;
606 this._positionCollapser.isCollapsed = this.isPositionCollapsed; 606 this._positionCollapser.isCollapsed = this.isPositionCollapsed;
607 this._positionCollapser.isAnimated = true; 607 this._positionCollapser.isAnimated = true;
608 this._positionCollapser.labelClickEvent = function () { 608 this._positionCollapser.labelClickEvent = function () {
609 that.isPositionCollapsed = that._positionCollapser.isCollapsed; 609 that.isPositionCollapsed = that._positionCollapser.isCollapsed;
610 }; 610 };
611 this._positionCollapser.needsDraw = true; 611 //this._positionCollapser.needsDraw = true;
612 612
613 this._transformCollapser = Collapser.create(); 613 this._transformCollapser = Collapser.create();
614 this._transformCollapser.clicker = this.labelTransform; 614 this._transformCollapser.clicker = this.labelTransform;
615 this._transformCollapser.myContent = this.contentTransform; 615 this._transformCollapser.myContent = this.contentTransform;
616 this._transformCollapser.contentHeight = 100; 616 this._transformCollapser.contentHeight = 100;
617 this._transformCollapser.isLabelClickable = false; 617 this._transformCollapser.isLabelClickable = false;
618 this._transformCollapser.element = this.element; 618 this._transformCollapser.element = this.contentTransform;
619 this._transformCollapser.isCollapsed = this.isTransformCollapsed; 619 this._transformCollapser.isCollapsed = this.isTransformCollapsed;
620 this._transformCollapser.isAnimated = true; 620 this._transformCollapser.isAnimated = true;
621 this._transformCollapser.labelClickEvent = function () { 621 this._transformCollapser.labelClickEvent = function () {
622 that.isTransformCollapsed = that._transformCollapser.isCollapsed; 622 that.isTransformCollapsed = that._transformCollapser.isCollapsed;
623 }; 623 };
624 this._transformCollapser.needsDraw = true; 624 //this._transformCollapser.needsDraw = true;
625 625
626 this._styleCollapser = Collapser.create(); 626 this._styleCollapser = Collapser.create();
627 this._styleCollapser.clicker = this.labelStyles; 627 this._styleCollapser.clicker = this.labelStyles;
628 this._styleCollapser.myContent = this.contentStyles; 628 this._styleCollapser.myContent = this.contentStyles;
629 this._styleCollapser.contentHeight = 0; 629 this._styleCollapser.contentHeight = 0;
630 this._styleCollapser.isLabelClickable = false; 630 this._styleCollapser.isLabelClickable = false;
631 this._styleCollapser.element = this.element; 631 this._styleCollapser.element = this.contentStyles;
632 this._styleCollapser.isCollapsed = this.isStyleCollapsed; 632 this._styleCollapser.isCollapsed = this.isStyleCollapsed;
633 this._styleCollapser.isAnimated = true; 633 this._styleCollapser.isAnimated = true;
634 this._styleCollapser.labelClickEvent = function () { 634 this._styleCollapser.labelClickEvent = function () {
635 that.isStyleCollapsed = that._styleCollapser.isCollapsed; 635 that.isStyleCollapsed = that._styleCollapser.isCollapsed;
636 }; 636 };
637 this._styleCollapser.needsDraw = true; 637 //this._styleCollapser.needsDraw = true;
638 638
639 // Register event handler for layer events. 639 // Register event handler for layer events.
640 var that = this;
641 defaultEventManager.addEventListener("layerEvent", this, false); 640 defaultEventManager.addEventListener("layerEvent", this, false);
642 641
643 } 642 }