aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel/Layer.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-15 16:27:30 -0700
committerValerio Virgillito2012-03-15 16:27:30 -0700
commitdb59414f48d79f8f959dcc105cfaf616268ca235 (patch)
treedcf41d3c12043728647d703ad54d9a5bd1fe62df /js/panels/Timeline/Layer.reel/Layer.js
parente6bfd7fb3d3324bea5dbc05350832a9e25c6c00d (diff)
parent47c7ba7a500082af0268b39ebbbbe926fa284920 (diff)
downloadninja-db59414f48d79f8f959dcc105cfaf616268ca235.tar.gz
Merge pull request #120 from imix23ways/TimelineUber
Timeline uber
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js20
1 files changed, 16 insertions, 4 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index b41680be..5206ae16 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -255,12 +255,12 @@ var Layer = exports.Layer = Montage.create(Component, {
255 if (value !== this._isSelected) { 255 if (value !== this._isSelected) {
256 // Only concerned about different values 256 // Only concerned about different values
257 if (value === false) { 257 if (value === false) {
258 // If changing from false to true, we need to deselect any associated styles 258 // If changing from true to false, we need to deselect any associated styles
259 this.selectStyle(false); 259 this.selectStyle(false);
260 } 260 }
261 this._isSelected = value; 261 this._isSelected = value;
262 this.layerData.isSelected = value; 262 this.layerData.isSelected = value;
263 //this.needsDraw = true; 263 this.needsDraw = true;
264 } 264 }
265 265
266 } 266 }
@@ -381,7 +381,6 @@ var Layer = exports.Layer = Montage.create(Component, {
381 return this._bypassAnimation; 381 return this._bypassAnimation;
382 }, 382 },
383 set: function(newVal) { 383 set: function(newVal) {
384 //console.log("layer.js _bypassAnimation setter " + newVal)
385 this._bypassAnimation = newVal; 384 this._bypassAnimation = newVal;
386 } 385 }
387 }, 386 },
@@ -406,7 +405,6 @@ var Layer = exports.Layer = Montage.create(Component, {
406 405
407 setData:{ 406 setData:{
408 value:function(){ 407 value:function(){
409 this.log('layer: setData called')
410 this.layerName = this.layerData.layerName; 408 this.layerName = this.layerData.layerName;
411 this.layerID = this.layerData.layerID; 409 this.layerID = this.layerData.layerID;
412 this.arrLayerStyles = this.layerData.arrLayerStyles; 410 this.arrLayerStyles = this.layerData.arrLayerStyles;
@@ -424,9 +422,13 @@ var Layer = exports.Layer = Montage.create(Component, {
424 this.dtextScaleX = this.layerData.dtextScaleX; 422 this.dtextScaleX = this.layerData.dtextScaleX;
425 this.dtextScaleY = this.layerData.dtextScaleY; 423 this.dtextScaleY = this.layerData.dtextScaleY;
426 this.dtextRotate = this.layerData.dtextRotate; 424 this.dtextRotate = this.layerData.dtextRotate;
425 this._isFirstDraw = this.layerData._isFirstDraw;
427 this.needsDraw = true; 426 this.needsDraw = true;
428 } 427 }
429 }, 428 },
429 _isFirstDraw : {
430 value: true
431 },
430 432
431 /* END: Models */ 433 /* END: Models */
432 434
@@ -483,6 +485,16 @@ var Layer = exports.Layer = Montage.create(Component, {
483 } 485 }
484 } 486 }
485 }, 487 },
488 didDraw: {
489 value: function() {
490 if ((this.isSelected === true) && (this._isFirstDraw === true)) {
491 // Once we're done drawing the first time we need to tell the TimelinePanel if
492 // this layer is supposed to be selected.
493 this.parentComponent.parentComponent.selectedLayerID = this.layerID;
494 this._isFirstDraw = false;
495 }
496 }
497 },
486 /* End: Draw cycle */ 498 /* End: Draw cycle */
487 499
488 /* Begin: Controllers */ 500 /* Begin: Controllers */