diff options
author | Armen Kesablyan | 2012-03-19 11:01:00 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-03-19 11:01:00 -0700 |
commit | 60107392554fa993a16e748f7281be423055cd19 (patch) | |
tree | 408b7b9422265d29df2c37eb6a120c09812abf2c /js/panels/Timeline/Layer.reel | |
parent | 725bb869618b9e0ebb2820a24bca5d1cf53a4810 (diff) | |
parent | 954f5a13e371febcb1c0fb8015c577ee51c23130 (diff) | |
download | ninja-60107392554fa993a16e748f7281be423055cd19.tar.gz |
Merge branch 'refs/heads/master' into DataBinding
Diffstat (limited to 'js/panels/Timeline/Layer.reel')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 20 |
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 */ |