aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel/Layer.js
diff options
context:
space:
mode:
authorPushkar Joshi2012-03-16 11:52:13 -0700
committerPushkar Joshi2012-03-16 11:52:13 -0700
commit1da989027e46102a9dc2aa2b5d764f58b97aa31b (patch)
tree496b8c7952c01b2caae76dda901b4173eedb11d2 /js/panels/Timeline/Layer.reel/Layer.js
parente574f722864a246bad40d3f5a4e59f7ccb206ea9 (diff)
parent3e98d9eaf6f691aa0f7a4334983537a4ee3ffd39 (diff)
downloadninja-1da989027e46102a9dc2aa2b5d764f58b97aa31b.tar.gz
Merge branch 'master' into brushtool
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 */