diff options
Diffstat (limited to 'js/panels/Timeline/Tween.reel/Tween.js')
-rw-r--r-- | js/panels/Timeline/Tween.reel/Tween.js | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index a9ee1fec..729abd64 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js | |||
@@ -118,6 +118,21 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
118 | this.needsDraw = true; | 118 | this.needsDraw = true; |
119 | } | 119 | } |
120 | }, | 120 | }, |
121 | |||
122 | _isClearing : { | ||
123 | serializable: true, | ||
124 | value: false | ||
125 | }, | ||
126 | isClearing : { | ||
127 | get: function() { | ||
128 | return this._isClearing; | ||
129 | }, | ||
130 | set: function(newVal) { | ||
131 | if (newVal === "clear it") { | ||
132 | this.eventManager.removeEventListener("elementChange", this, false); | ||
133 | } | ||
134 | } | ||
135 | }, | ||
121 | 136 | ||
122 | prepareForDraw:{ | 137 | prepareForDraw:{ |
123 | value:function () { | 138 | value:function () { |
@@ -141,9 +156,6 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
141 | 156 | ||
142 | if (event.detail.source && event.detail.source !== "tween") { | 157 | if (event.detail.source && event.detail.source !== "tween") { |
143 | // check for correct element selection | 158 | // check for correct element selection |
144 | console.log("handleElementChange! " + this.tweenID) | ||
145 | console.log(this.application.ninja.selectedElements[0]._element); | ||
146 | console.log(this.parentComponent.parentComponent.animatedElement); | ||
147 | if (this.application.ninja.selectedElements[0]._element != this.parentComponent.parentComponent.animatedElement) { | 159 | if (this.application.ninja.selectedElements[0]._element != this.parentComponent.parentComponent.animatedElement) { |
148 | alert("Wrong element selected for this keyframe track"); | 160 | alert("Wrong element selected for this keyframe track"); |
149 | } else { | 161 | } else { |
@@ -165,7 +177,6 @@ var Tween = exports.Tween = Montage.create(Component, { | |||
165 | selectTween:{ | 177 | selectTween:{ |
166 | value: function(){ | 178 | value: function(){ |
167 | // turn on event listener for element change | 179 | // turn on event listener for element change |
168 | console.log('adding elementChange event listener for tween ' + this.tweenID) | ||
169 | this.eventManager.addEventListener("elementChange", this, false); | 180 | this.eventManager.addEventListener("elementChange", this, false); |
170 | 181 | ||
171 | // select the containing layer | 182 | // select the containing layer |