aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Tween.reel/Tween.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Tween.reel/Tween.js')
-rw-r--r--js/panels/Timeline/Tween.reel/Tween.js24
1 files changed, 17 insertions, 7 deletions
diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js
index f6dbf32c..6ff38bef 100644
--- a/js/panels/Timeline/Tween.reel/Tween.js
+++ b/js/panels/Timeline/Tween.reel/Tween.js
@@ -118,11 +118,20 @@ var Tween = exports.Tween = Montage.create(Component, {
118 this.needsDraw = true; 118 this.needsDraw = true;
119 } 119 }
120 }, 120 },
121 121
122 prepareForDraw:{ 122 _isClearing : {
123 value:function () { 123 serializable: true,
124 124 value: false
125 } 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 }
126 }, 135 },
127 136
128 draw:{ 137 draw:{
@@ -138,10 +147,11 @@ var Tween = exports.Tween = Montage.create(Component, {
138 147
139 handleElementChange:{ 148 handleElementChange:{
140 value:function (event) { 149 value:function (event) {
150
141 if (event.detail.source && event.detail.source !== "tween") { 151 if (event.detail.source && event.detail.source !== "tween") {
142 // check for correct element selection 152 // check for correct element selection
143 if (this.application.ninja.selectedElements[0]._element != this.parentComponent.parentComponent.animatedElement) { 153 if (this.application.ninja.selectedElements[0]._element != this.parentComponent.parentComponent.animatedElement) {
144 alert("Wrong element selected for this keyframe track"); 154 console.log("Wrong element selected for this keyframe track");
145 } else { 155 } else {
146 // update tweenedProperties and tell containing track to update CSS rule 156 // update tweenedProperties and tell containing track to update CSS rule
147 // temp read only top and left. need to change to loop over event details for prop changes generically 157 // temp read only top and left. need to change to loop over event details for prop changes generically
@@ -165,7 +175,7 @@ var Tween = exports.Tween = Montage.create(Component, {
165 175
166 // select the containing layer 176 // select the containing layer
167 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.parentComponent.parentComponent.trackID); 177 var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.parentComponent.parentComponent.trackID);
168 this.application.ninja.timeline.selectLayer(selectIndex); 178 this.application.ninja.timeline.selectLayer(selectIndex, true);
169 179
170 // tell timeline to deselect all other tweens and push this one as the currentSelectedTweens in timeline 180 // tell timeline to deselect all other tweens and push this one as the currentSelectedTweens in timeline
171 this.application.ninja.timeline.deselectTweens(); 181 this.application.ninja.timeline.deselectTweens();