From 5689e3e2deda1b1f7ba32f6007ddab20f6c1fe64 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Fri, 2 Mar 2012 18:17:14 -0800 Subject: Timeline: Serialization of all Collapser components --- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js') diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 420be0c9..6e753b9f 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -57,7 +57,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { set:function (newVal) { if (newVal !== this._isTransformCollapsed) { this._isTransformCollapsed = newVal; - this.needsDraw = true; } } }, @@ -71,7 +70,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { set:function (newVal) { if (newVal !== this._isPositionCollapsed) { this._isPositionCollapsed = newVal; - this.needsDraw = true; } } }, @@ -85,21 +83,21 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { set:function (newVal) { if (newVal !== this._isStyleCollapsed) { this._isStyleCollapsed = newVal; - this.needsDraw = true; } } }, - _animateCollapser : { + _bypassAnimation : { serializable: true, value: false }, - animateCollapser : { + bypassAnimation : { serializable: true, get: function() { - return this._animateCollapser; + return this._bypassAnimation; }, set: function(newVal) { - this._animateCollapser = newVal; + //console.log("timelinetrack bypassAnimation setter " + newVal) + this._bypassAnimation = newVal; } }, @@ -582,7 +580,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { this.arrPositionTracks = [0, 1]; this.arrTransformTracks = [0, 1, 2, 3, 4]; - + /* this.label = this.element.querySelector(".label-main"); this.myContent = this.element.querySelector(".content-main"); this.labelPosition = this.element.querySelector(".label-position"); @@ -605,22 +603,25 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { boundObjectPropertyPath: "isMainCollapsed", oneway: false }); + + Object.defineBinding(this._mainCollapser, "bypassAnimation", { boundObject: this, boundObjectPropertyPath: "animateCollapser", oneway: false, boundValueMutator: function(value) { - return !value; + console.log('mutating') + return !value } }); - + */ /* this._mainCollapser.labelClickEvent = function () { that.isMainCollapsed = that._mainCollapser.isCollapsed; }; */ //this._mainCollapser.needsDraw = true; - +/* this._positionCollapser = Collapser.create(); this._positionCollapser.clicker = this.labelPosition; this._positionCollapser.myContent = this.contentPosition; @@ -634,7 +635,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { boundObjectPropertyPath: "isPositionCollapsed", oneway: false }); - + */ /* this._positionCollapser.labelClickEvent = function () { @@ -642,7 +643,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { }; */ //this._positionCollapser.needsDraw = true; - +/* this._transformCollapser = Collapser.create(); this._transformCollapser.clicker = this.labelTransform; this._transformCollapser.myContent = this.contentTransform; @@ -656,7 +657,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { boundObjectPropertyPath: "isTransformCollapsed", oneway: false }); - + */ /* this._transformCollapser.labelClickEvent = function () { @@ -665,6 +666,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { */ //this._transformCollapser.needsDraw = true; +/* this._styleCollapser = Collapser.create(); this._styleCollapser.clicker = this.labelStyles; this._styleCollapser.myContent = this.contentStyles; @@ -679,7 +681,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { oneway: false }); - + */ /* this._styleCollapser.labelClickEvent = function () { that.isStyleCollapsed = that._styleCollapser.isCollapsed; -- cgit v1.2.3