aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJon Reid2012-03-08 11:18:46 -0800
committerJon Reid2012-03-08 11:18:46 -0800
commitb35467e08f50f07f0fd556e17618ad331d35637b (patch)
tree0ae47d17bc46a6650d04870de705bd91f27dc12b /js
parentde3b2f1dce91b8bf807e1b9264dbeb835d0c3006 (diff)
parentb4aa9a46bdf6ed748cbb3fc2a2a4fc226e0e7fd7 (diff)
downloadninja-b35467e08f50f07f0fd556e17618ad331d35637b.tar.gz
Merge remote-tracking branch 'ninja-jduran/SerialKiller' into Timeline-local
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js27
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js26
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js34
3 files changed, 49 insertions, 38 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index d65d031f..e561e45d 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -82,8 +82,8 @@ var Layer = exports.Layer = Montage.create(Component, {
82 if (newVal !== this._layerName) { 82 if (newVal !== this._layerName) {
83 this._layerEditable.value = newVal; 83 this._layerEditable.value = newVal;
84 this._layerName = newVal; 84 this._layerName = newVal;
85 this._layerEditable.needsDraw = true; 85 //this._layerEditable.needsDraw = true;
86 this.needsDraw = true; 86 //this.needsDraw = true;
87 } 87 }
88 88
89 } 89 }
@@ -119,7 +119,7 @@ var Layer = exports.Layer = Montage.create(Component, {
119 set:function(value){ 119 set:function(value){
120 if (this._dtextPositionX !== value) { 120 if (this._dtextPositionX !== value) {
121 this._dtextPositionX = value; 121 this._dtextPositionX = value;
122 this.needsDraw = true; 122 //this.needsDraw = true;
123 } 123 }
124 124
125 } 125 }
@@ -138,7 +138,7 @@ var Layer = exports.Layer = Montage.create(Component, {
138 set:function(value){ 138 set:function(value){
139 if (this._dtextPositionY !== value) { 139 if (this._dtextPositionY !== value) {
140 this._dtextPositionY = value; 140 this._dtextPositionY = value;
141 this.needsDraw = true; 141 //this.needsDraw = true;
142 } 142 }
143 143
144 } 144 }
@@ -157,7 +157,7 @@ var Layer = exports.Layer = Montage.create(Component, {
157 set:function(value){ 157 set:function(value){
158 if (this._dtextScaleX !== value) { 158 if (this._dtextScaleX !== value) {
159 this._dtextScaleX = value; 159 this._dtextScaleX = value;
160 this.needsDraw = true; 160 //this.needsDraw = true;
161 } 161 }
162 162
163 } 163 }
@@ -176,7 +176,7 @@ var Layer = exports.Layer = Montage.create(Component, {
176 set:function(value){ 176 set:function(value){
177 if (this._dtextScaleY !== value) { 177 if (this._dtextScaleY !== value) {
178 this._dtextScaleY = value; 178 this._dtextScaleY = value;
179 this.needsDraw = true; 179 //this.needsDraw = true;
180 } 180 }
181 181
182 } 182 }
@@ -195,7 +195,7 @@ var Layer = exports.Layer = Montage.create(Component, {
195 set:function(value){ 195 set:function(value){
196 if (this._dtextSkewX !== value) { 196 if (this._dtextSkewX !== value) {
197 this._dtextSkewX = value; 197 this._dtextSkewX = value;
198 this.needsDraw = true; 198 //this.needsDraw = true;
199 } 199 }
200 200
201 } 201 }
@@ -214,7 +214,7 @@ var Layer = exports.Layer = Montage.create(Component, {
214 set:function(value){ 214 set:function(value){
215 if (this._dtextSkewY !== value) { 215 if (this._dtextSkewY !== value) {
216 this._dtextSkewY = value; 216 this._dtextSkewY = value;
217 this.needsDraw = true; 217 //this.needsDraw = true;
218 } 218 }
219 219
220 } 220 }
@@ -233,7 +233,7 @@ var Layer = exports.Layer = Montage.create(Component, {
233 set:function(value){ 233 set:function(value){
234 if (this._dtextRotate !== value) { 234 if (this._dtextRotate !== value) {
235 this._dtextRotate = value; 235 this._dtextRotate = value;
236 this.needsDraw = true; 236 //this.needsDraw = true;
237 } 237 }
238 238
239 } 239 }
@@ -259,7 +259,7 @@ var Layer = exports.Layer = Montage.create(Component, {
259 this.selectStyle(false); 259 this.selectStyle(false);
260 } 260 }
261 this._isSelected = value; 261 this._isSelected = value;
262 this.needsDraw = true; 262 //this.needsDraw = true;
263 } 263 }
264 264
265 } 265 }
@@ -332,7 +332,7 @@ var Layer = exports.Layer = Montage.create(Component, {
332 set: function(newVal) { 332 set: function(newVal) {
333 if (newVal !== this._isTransformCollapsed) { 333 if (newVal !== this._isTransformCollapsed) {
334 this._isTransformCollapsed = newVal; 334 this._isTransformCollapsed = newVal;
335 this.needsDraw = true; 335 //this.needsDraw = true;
336 } 336 }
337 } 337 }
338 }, 338 },
@@ -349,7 +349,7 @@ var Layer = exports.Layer = Montage.create(Component, {
349 set: function(newVal) { 349 set: function(newVal) {
350 if (newVal !== this._isPositionCollapsed) { 350 if (newVal !== this._isPositionCollapsed) {
351 this._isPositionCollapsed = newVal; 351 this._isPositionCollapsed = newVal;
352 this.needsDraw = true; 352 //this.needsDraw = true;
353 } 353 }
354 } 354 }
355 }, 355 },
@@ -366,7 +366,7 @@ var Layer = exports.Layer = Montage.create(Component, {
366 set: function(newVal) { 366 set: function(newVal) {
367 if (newVal !== this._isStyleCollapsed) { 367 if (newVal !== this._isStyleCollapsed) {
368 this._isStyleCollapsed = newVal; 368 this._isStyleCollapsed = newVal;
369 this.needsDraw = true; 369 //this.needsDraw = true;
370 } 370 }
371 } 371 }
372 }, 372 },
@@ -422,6 +422,7 @@ var Layer = exports.Layer = Montage.create(Component, {
422 this.dtextScaleX = this.layerData.dtextScaleX; 422 this.dtextScaleX = this.layerData.dtextScaleX;
423 this.dtextScaleY = this.layerData.dtextScaleY; 423 this.dtextScaleY = this.layerData.dtextScaleY;
424 this.dtextRotate = this.layerData.dtextRotate; 424 this.dtextRotate = this.layerData.dtextRotate;
425 this.needsDraw = true;
425 } 426 }
426 }, 427 },
427 428
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index dfc40c0a..cd7622b1 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -277,6 +277,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
277 this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false); 277 this.layout_tracks.addEventListener("scroll", this.updateLayerScroll.bind(this), false);
278 this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false); 278 this.user_layers.addEventListener("scroll", this.updateLayerScroll.bind(this), false);
279 this.end_hottext.addEventListener("changing", this.updateTrackContainerWidth.bind(this), false); 279 this.end_hottext.addEventListener("changing", this.updateTrackContainerWidth.bind(this), false);
280 this.playhead.addEventListener("mousedown", this.startPlayheadTracking.bind(this), false);
281 this.playhead.addEventListener("mouseup", this.stopPlayheadTracking.bind(this), false);
282 this.time_markers.addEventListener("click", this.updatePlayhead.bind(this), false);
280 } 283 }
281 }, 284 },
282 285
@@ -398,6 +401,29 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
398 } 401 }
399 }, 402 },
400 403
404 startPlayheadTracking:{
405 value:function(){
406 this.time_markers.onmousemove = this.updatePlayhead.bind(this);
407 }
408 },
409
410 stopPlayheadTracking:{
411 value:function () {
412 this.time_markers.onmousemove = null;
413 }
414 },
415
416 updatePlayhead:{
417 value:function (event) {
418 var clickedPosition = event.target.offsetLeft + event.offsetX;
419 this.playhead.style.left = (clickedPosition - 2) + "px";
420 this.playheadmarker.style.left = clickedPosition + "px";
421 var currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80);
422 var currentMillisec = currentMillisecPerPixel * clickedPosition;
423 this.updateTimeText(currentMillisec);
424 }
425 },
426
401 handleSelectionChange:{ 427 handleSelectionChange:{
402 value:function(){ 428 value:function(){
403 var key , switchSelectedLayer,layerIndex; 429 var key , switchSelectedLayer,layerIndex;
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index 17e50789..18df20c2 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -27,7 +27,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
27 }, 27 },
28 set:function (value) { 28 set:function (value) {
29 this._trackID = value; 29 this._trackID = value;
30 this.needsDraw = true; 30 //this.needsDraw = true;
31 } 31 }
32 }, 32 },
33 33
@@ -114,7 +114,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
114 }, 114 },
115 set: function(newVal) { 115 set: function(newVal) {
116 this._arrStyleTracks = newVal; 116 this._arrStyleTracks = newVal;
117 this.needsDra