aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Style.reel
diff options
context:
space:
mode:
authorJon Reid2012-07-03 14:42:03 -0700
committerJon Reid2012-07-03 14:42:03 -0700
commit539f430f95812e726ad14012965ece942a010bca (patch)
treeb8b48c2048a5a3fe7ae7bbf156205dd2a4620a9d /js/panels/Timeline/Style.reel
parentb05173c892ebbdb5a7568d3904011ab1bfa695a3 (diff)
downloadninja-539f430f95812e726ad14012965ece942a010bca.tar.gz
Timeline: Refactor style and layer to use pointers to parent components.
Diffstat (limited to 'js/panels/Timeline/Style.reel')
-rw-r--r--js/panels/Timeline/Style.reel/Style.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js
index 78bc2db3..802c6311 100644
--- a/js/panels/Timeline/Style.reel/Style.js
+++ b/js/panels/Timeline/Style.reel/Style.js
@@ -284,6 +284,13 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
284 this.init(); 284 this.init();
285 } 285 }
286 }, 286 },
287 willDraw: {
288 value: function() {
289 if (this._parentLayerComponent === null) {
290 this._parentLayerComponent = this.parentComponent.parentComponent.parentComponent.parentComponent;
291 }
292 }
293 },
287 draw: { 294 draw: {
288 value: function() { 295 value: function() {
289 // Show the right view 296 // Show the right view
@@ -372,9 +379,7 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
372 379
373 var arrHints = [], 380 var arrHints = [],
374 i = 0; 381 i = 0;
375 382
376 this._parentLayerComponent = this.parentComponent.parentComponent.parentComponent.parentComponent;
377
378 // Get the array of hints from _myTweenables: 383 // Get the array of hints from _myTweenables:
379 for (i = 0; i < this._myTweenables.length; i++) { 384 for (i = 0; i < this._myTweenables.length; i++) {
380 arrHints.push(this._myTweenables[i].property) 385 arrHints.push(this._myTweenables[i].property)