diff options
author | Jose Antonio Marquez | 2012-03-15 21:07:26 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-15 21:07:26 -0700 |
commit | a9cd3284a16619dae36122b92e21f888526364e4 (patch) | |
tree | 841fa86107e380336d2be5f29120b44fd98d7fbd /js/panels/Timeline/Layer.reel/Layer.js | |
parent | a295375178659345e03517f7eb20c22364f4ca4a (diff) | |
parent | bb6449a3a2adcbc1d109a042e4ee23e7b2614821 (diff) | |
download | ninja-a9cd3284a16619dae36122b92e21f888526364e4.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-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 */ |