From b0a736deb4f3bb515e0ca4009fe4f98e22cec2c0 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Fri, 25 May 2012 10:15:48 -0700 Subject: Timeline: Better fix for keeping styles/tracks in synch when adding styles on document open. --- js/panels/Timeline/Layer.reel/Layer.js | 8 +++++++- js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 3 --- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'js/panels') diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index db99e869..45d6f0a3 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js @@ -579,10 +579,11 @@ var Layer = exports.Layer = Montage.create(Component, { // newStyle = LayerStyle.create(), newStyle = {}, newEvent = document.createEvent("CustomEvent"); - + /* this.isStyleCollapsed = false; this.layerData.isStyleCollapsed = false; this.triggerOutgoingBinding(); + */ newEvent.initCustomEvent("layerEvent", false, true); newEvent.layerEventLocale = "styles"; @@ -702,6 +703,11 @@ var Layer = exports.Layer = Montage.create(Component, { }, handleAddStyleClick: { value: function(event) { + + this.isStyleCollapsed = false; + this.layerData.isStyleCollapsed = false; + this.triggerOutgoingBinding(); + this.addStyle(); } }, diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 9c8b5206..8fd62187 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -976,9 +976,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { restoredStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; this.arrStyleTracks.push(restoredStyleTrack); - - this.isStyleCollapsed = true; - this.triggerOutgoingBinding(); } else if (layerEvent.layerEventType === "deleteStyle") { // TODO: Delete the right track. Index can be passed in event object, use that for splice(). -- cgit v1.2.3