diff options
author | Jon Reid | 2012-07-03 14:42:03 -0700 |
---|---|---|
committer | Jon Reid | 2012-07-03 14:42:03 -0700 |
commit | 539f430f95812e726ad14012965ece942a010bca (patch) | |
tree | b8b48c2048a5a3fe7ae7bbf156205dd2a4620a9d /js/panels/Timeline/Style.reel/Style.js | |
parent | b05173c892ebbdb5a7568d3904011ab1bfa695a3 (diff) | |
download | ninja-539f430f95812e726ad14012965ece942a010bca.tar.gz |
Timeline: Refactor style and layer to use pointers to parent components.
Diffstat (limited to 'js/panels/Timeline/Style.reel/Style.js')
-rw-r--r-- | js/panels/Timeline/Style.reel/Style.js | 11 |
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) |