aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rw-r--r--js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js40
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js4
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css2
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss1
4 files changed, 45 insertions, 2 deletions
diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
index 9ee9b922..e5ff1e95 100644
--- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
+++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js
@@ -192,6 +192,7 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
192 this.trackID = this.timelineTrack.trackID; 192 this.trackID = this.timelineTrack.trackID;
193 this.animatedElement = this.timelineTrack.animatedElement; 193 this.animatedElement = this.timelineTrack.animatedElement;
194 this.ninjaStylesContoller = this.application.ninja.stylesController; 194 this.ninjaStylesContoller = this.application.ninja.stylesController;
195 this.eventManager.addEventListener("tlZoomSlider", this, false);
195 196
196 // Drag and Drop event handlers 197 // Drag and Drop event handlers
197 this.element.addEventListener("dragstart", this.handleKeyframeDragstart.bind(this), false); 198 this.element.addEventListener("dragstart", this.handleKeyframeDragstart.bind(this), false);
@@ -286,6 +287,45 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, {
286 } 287 }
287 }, 288 },
288 289
290 handleTlZoomSlider: {
291 value: function(event) {
292
293 var currentMilliSecPerPixel , currentMilliSec , clickPos,thingToPush;
294 var i = 0,
295 tweensLength = this.propTweens.length;
296
297 for (i = 0; i < tweensLength; i++) {
298
299 if (i === 0) {
300 // Exception: 0th item does not depend on anything
301 // If 0th tween is draggable, this will need to be fixed.
302 this.propTweens[i].tweenData.spanWidth=0;
303 this.propTweens[i].tweenData.spanPosition=0;
304 this.propTweens[i].tweenData.keyFramePosition=0;
305 this.propTweens[i].tweenData.keyFrameMillisec=0;
306
307 } else {
308 var prevKeyFramePosition = this.propTweens[i - 1].tweenData.keyFramePosition,
309 myObj = {},
310 thing = {};
311
312 currentMilliSecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80);
313 currentMilliSec = this.propTweens[i].tweenData.keyFrameMillisec;
314 clickPos = currentMilliSec / currentMilliSecPerPixel;
315
316 for (thing in this.propTweens[i].tweenData) {
317 myObj[thing] = this.propTweens[i].tweenData[thing];
318 }
319 myObj.spanWidth = clickPos - prevKeyFramePosition;
320 myObj.keyFramePosition = clickPos;
321 myObj.spanPosition = clickPos - (clickPos - prevKeyFramePosition);
322
323 this.propTweens[i].tweenData = myObj;
324 }
325 }
326 }
327 },
328
289 /* End: Event Handlers */ 329 /* End: Event Handlers */
290 330
291 /* Begin: Controllers */ 331 /* Begin: Controllers */
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index c790466c..aafc3d1d 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -509,6 +509,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
509 }, 509 },
510 set:function (newVal) { 510 set:function (newVal) {
511 if (newVal !== this._millisecondsOffset) { 511 if (newVal !== this._millisecondsOffset) {
512
513 var tempValue = (1/newVal) * 1000000;
514 newVal = tempValue;
515
512 this._millisecondsOffset= newVal; 516 this._millisecondsOffset= newVal;
513 this.drawTimeMarkers(); 517 this.drawTimeMarkers();
514 NJevent('tlZoomSlider',this); 518 NJevent('tlZoomSlider',this);
diff --git a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css
index f7e9234e..d8293d77 100644
--- a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css
+++ b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css
@@ -132,7 +132,7 @@ POSSIBILITY OF SUCH DAMAGE.
132.timeline-dnd-helper { -webkit-transform: scale(0.9, 0.9); } 132.timeline-dnd-helper { -webkit-transform: scale(0.9, 0.9); }
133 133
134/* line 308, ../scss/TimelinePanel.scss */ 134/* line 308, ../scss/TimelinePanel.scss */
135.tl_slider { width: 65px; height: 5px; background: none; float: left; margin-left: 5%; visibility: hidden; } 135.tl_slider { width: 65px; height: 5px; background: none; float: left; margin-left: 5%;}
136 136
137/* Configuration menu */ 137/* Configuration menu */
138/* line 318, ../scss/TimelinePanel.scss */ 138/* line 318, ../scss/TimelinePanel.scss */
diff --git a/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss b/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss
index 460fe5e3..4fbcc400 100644
--- a/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss
+++ b/js/panels/Timeline/TimelinePanel.reel/scss/TimelinePanel.scss
@@ -335,7 +335,6 @@ POSSIBILITY OF SUCH DAMAGE.
335 background: none; 335 background: none;
336 float:left; 336 float:left;
337 margin-left: 5%; 337 margin-left: 5%;
338 visibility: hidden;
339} 338}
340 339
341/* Configuration menu */ 340/* Configuration menu */