From 205d869d94005cb214fd838879d4f5e81d763311 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 1 Mar 2012 18:01:08 -0800 Subject: Timeline: Merge arrlayers and arrtracks into one object. Redefine collapser to use property binding instead of events. --- js/panels/Timeline/Collapser.js | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'js/panels/Timeline/Collapser.js') diff --git a/js/panels/Timeline/Collapser.js b/js/panels/Timeline/Collapser.js index ad490c2e..d161cdd7 100644 --- a/js/panels/Timeline/Collapser.js +++ b/js/panels/Timeline/Collapser.js @@ -68,7 +68,7 @@ var Montage = require("montage/core/core").Montage, }, _bypassAnimation : { - value: false + value: true }, bypassAnimation: { get: function() { @@ -169,6 +169,28 @@ var Montage = require("montage/core/core").Montage, } }, + _isToggling: { + serializable: true, + value: true + }, + isToggling: { + serializable: true, + get: function() { + return this._isToggling; + }, + set: function(newVal) { + if (newVal !== this._isToggling) { + this._isToggling = newVal; + + if (this.bypassAnimation) { + this.isAnimated = false; + } + this.myContent.classList.remove(this.transitionClass); + this.handleCollapserLabelClick(); + } + } + }, + /* === END: Models === */ /* === BEGIN: Draw cycle === */ @@ -321,7 +343,7 @@ var Montage = require("montage/core/core").Montage, } if (this.bypassAnimation) { - this.bypassAnimation = false; + this.bypassAnimation = true; this.isAnimated = true; } } -- cgit v1.2.3