aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-19 15:53:54 -0700
committerValerio Virgillito2012-07-19 15:53:54 -0700
commit6403ec6d21048c93138ddcbcc59fc4677121ed5e (patch)
tree43d371557e28383fb962cb86d1a478f3a35d7ff3 /js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
parentfc13ef1e806116bb7ece5bb06604fa4f5714a6ed (diff)
downloadninja-6403ec6d21048c93138ddcbcc59fc4677121ed5e.tar.gz
Timeline: updated livePreview to timeline play. Hide canvas and draw red outline
- Changed the play button to a toggle button - livePreview code in stage activated via bindings - Draw a red outline of the canvas when in play Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js31
1 files changed, 15 insertions, 16 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 4e9771d4..521c315d 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -36,6 +36,21 @@ var Montage = require("montage/core/core").Montage,
36 36
37var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { 37var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
38 38
39 _stage: {
40 value: null
41 },
42
43 stage: {
44 get: function() {
45 return this._stage;
46 },
47 set: function(value) {
48 if(value) {
49 this._stage = value;
50 }
51 }
52 },
53
39 /* === BEGIN: Models === */ 54 /* === BEGIN: Models === */
40 _user_layers: { 55 _user_layers: {
41 value: null 56 value: null
@@ -1015,7 +1030,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1015 this.eventManager.addEventListener("updatedID", this.handleLayerIdUpdate.bind(this), false); 1030 this.eventManager.addEventListener("updatedID", this.handleLayerIdUpdate.bind(this), false);
1016 this.checkable_lock.addEventListener("click",this.handleLockLayerClick.bind(this),false); 1031 this.checkable_lock.addEventListener("click",this.handleLockLayerClick.bind(this),false);
1017 this.checkable_visible.addEventListener("click",this.handleLayerVisibleClick.bind(this),false); 1032 this.checkable_visible.addEventListener("click",this.handleLayerVisibleClick.bind(this),false);
1018 this.play_button.addEventListener("click", this.handlePlayButtonClick.bind(this), false);
1019 this.addPropertyChangeListener("currentDocument.model.domContainer", this); 1033 this.addPropertyChangeListener("currentDocument.model.domContainer", this);
1020 1034
1021 // Start the panel out in disabled mode by default 1035 // Start the panel out in disabled mode by default
@@ -1638,21 +1652,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1638 } 1652 }
1639 }, 1653 },
1640 1654
1641 handlePlayButtonClick:{
1642 value:function(ev){
1643 this.application.ninja.appModel.livePreview = !this.application.ninja.appModel.livePreview;
1644
1645 if (this.application.ninja.appModel.livePreview) {
1646 this.play_button.classList.remove("playbutton");
1647 this.play_button.classList.add("pausebutton");
1648
1649 } else {
1650 this.play_button.classList.remove("pausebutton");
1651 this.play_button.classList.add("playbutton");
1652 }
1653 }
1654 },
1655
1656 handleKeyframeShortcut:{ 1655 handleKeyframeShortcut:{
1657 value:function(action){ 1656 value:function(action){
1658 var tempEv = {}; 1657 var tempEv = {};