aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
authorJonathan Duran2012-06-26 17:48:31 -0700
committerJonathan Duran2012-06-26 17:48:31 -0700
commit9cefcd17e5b1943685130553f6a4f62179df8936 (patch)
tree86d327c9a6d153059693154c9435757009b50786 /js/panels/Timeline/TimelinePanel.reel
parent555b03e7be67f387a07433f8fd59d533b5c4993e (diff)
downloadninja-9cefcd17e5b1943685130553f6a4f62179df8936.tar.gz
FIx - hook up play button in timeline to live preview
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html6
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js16
2 files changed, 18 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index eac361a8..f6fae9b8 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -37,7 +37,8 @@
37 "checkable_animated" : {"#" : "checkable_animated"}, 37 "checkable_animated" : {"#" : "checkable_animated"},
38 "tl_configbutton" : {"#" : "tl-configbutton"}, 38 "tl_configbutton" : {"#" : "tl-configbutton"},
39 "checkable_lock" : {"#" : "checkable_lock"}, 39 "checkable_lock" : {"#" : "checkable_lock"},
40 "checkable_visible":{"#" : "checkable_visible"} 40 "checkable_visible":{"#" : "checkable_visible"},
41 "play_button" : {"#" : "play_button"}
41 } 42 }
42 }, 43 },
43 44
@@ -164,10 +165,7 @@
164 <div data-montage-id="leftpane_inside" class="leftinside"> 165 <div data-montage-id="leftpane_inside" class="leftinside">
165 <div data-montage-id="timeline_controller" class="timelinecontroller"> 166 <div data-montage-id="timeline_controller" class="timelinecontroller">
166 <div data-montage-id="timeline_controls" class="timelinecontrols"> 167 <div data-montage-id="timeline_controls" class="timelinecontrols">
167 <div data-montage-id="rewind_button" class="rewindbutton"></div>
168 <div data-montage-id="play_button" class="playbutton"></div> 168 <div data-montage-id="play_button" class="playbutton"></div>
169 <div data-montage-id="pause_button" class="pausebutton"></div>
170 <div data-montage-id="forward_button" class="forwardbutton"></div>
171 <div data-montage-id="time_text" class="timetext">00:00:00</div> 169 <div data-montage-id="time_text" class="timetext">00:00:00</div>
172 </div> 170 </div>
173 </div> 171 </div>
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index af358468..12b481de 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -910,6 +910,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
910 this.eventManager.addEventListener("updatedID", this.handleLayerIdUpdate.bind(this), false); 910 this.eventManager.addEventListener("updatedID", this.handleLayerIdUpdate.bind(this), false);
911 this.checkable_lock.addEventListener("click",this.handleLockLayerClick.bind(this),false); 911 this.checkable_lock.addEventListener("click",this.handleLockLayerClick.bind(this),false);
912 this.checkable_visible.addEventListener("click",this.handleLayerVisibleClick.bind(this),false); 912 this.checkable_visible.addEventListener("click",this.handleLayerVisibleClick.bind(this),false);
913 this.play_button.addEventListener("click", this.handlePlayButtonClick.bind(this), false);
913 914
914 this.addPropertyChangeListener("currentDocument.model.domContainer", this); 915 this.addPropertyChangeListener("currentDocument.model.domContainer", this);
915 916
@@ -1085,6 +1086,21 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1085 } 1086 }
1086 }, 1087 },
1087 1088
1089 handlePlayButtonClick:{
1090 value:function(ev){
1091 this.application.ninja.appModel.livePreview = !this.application.ninja.appModel.livePreview;
1092
1093 if (this.application.ninja.appModel.livePreview) {
1094 this.play_button.classList.remove("playbutton");
1095 this.play_button.classList.add("pausebutton");
1096
1097 } else {
1098 this.play_button.classList.remove("pausebutton");
1099 this.play_button.classList.add("playbutton");
1100 }
1101 }
1102 },
1103
1088 handleKeyframeShortcut:{ 1104 handleKeyframeShortcut:{
1089 value:function(action){ 1105 value:function(action){
1090 var tempEv = {}; 1106 var tempEv = {};