diff options
author | Jon Reid | 2012-05-25 10:15:48 -0700 |
---|---|---|
committer | Jon Reid | 2012-05-25 10:15:48 -0700 |
commit | b0a736deb4f3bb515e0ca4009fe4f98e22cec2c0 (patch) | |
tree | 38936d8849218b282931063a35b2613c3612424b | |
parent | 811ce7a7cdec18f304c6660a70012960e61d967a (diff) | |
download | ninja-b0a736deb4f3bb515e0ca4009fe4f98e22cec2c0.tar.gz |
Timeline: Better fix for keeping styles/tracks in synch when adding styles
on document open.
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 8 | ||||
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 3 |
2 files changed, 7 insertions, 4 deletions
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, { | |||
579 | // newStyle = LayerStyle.create(), | 579 | // newStyle = LayerStyle.create(), |
580 | newStyle = {}, | 580 | newStyle = {}, |
581 | newEvent = document.createEvent("CustomEvent"); | 581 | newEvent = document.createEvent("CustomEvent"); |
582 | 582 | /* | |
583 | this.isStyleCollapsed = false; | 583 | this.isStyleCollapsed = false; |
584 | this.layerData.isStyleCollapsed = false; | 584 | this.layerData.isStyleCollapsed = false; |
585 | this.triggerOutgoingBinding(); | 585 | this.triggerOutgoingBinding(); |
586 | */ | ||
586 | 587 | ||
587 | newEvent.initCustomEvent("layerEvent", false, true); | 588 | newEvent.initCustomEvent("layerEvent", false, true); |
588 | newEvent.layerEventLocale = "styles"; | 589 | newEvent.layerEventLocale = "styles"; |
@@ -702,6 +703,11 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
702 | }, | 703 | }, |
703 | handleAddStyleClick: { | 704 | handleAddStyleClick: { |
704 | value: function(event) { | 705 | value: function(event) { |
706 | |||
707 | this.isStyleCollapsed = false; | ||
708 | this.layerData.isStyleCollapsed = false; | ||
709 | this.triggerOutgoingBinding(); | ||
710 | |||
705 | this.addStyle(); | 711 | this.addStyle(); |
706 | } | 712 | } |
707 | }, | 713 | }, |
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, { | |||
976 | restoredStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; | 976 | restoredStyleTrack.propTrackData.styleIndex = layerEvent.styleIndex; |
977 | 977 | ||
978 | this.arrStyleTracks.push(restoredStyleTrack); | 978 | this.arrStyleTracks.push(restoredStyleTrack); |
979 | |||
980 | this.isStyleCollapsed = true; | ||
981 | this.triggerOutgoingBinding(); | ||
982 | } | 979 | } |
983 | else if (layerEvent.layerEventType === "deleteStyle") { | 980 | else if (layerEvent.layerEventType === "deleteStyle") { |
984 | // TODO: Delete the right track. Index can be passed in event object, use that for splice(). | 981 | // TODO: Delete the right track. Index can be passed in event object, use that for splice(). |