From 0ea5607c3760852b1fe63ad568b4db064129955b Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 2 Jul 2012 13:45:28 -0700 Subject: Fix performance bug when moving between nested levels Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'js/panels/Timeline/Tween.reel/Tween.js') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index ae8acc57..0d189fba 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -170,9 +170,26 @@ var Tween = exports.Tween = Montage.create(Component, { }, + _initSelect:{ + value: null + }, + initSelect:{ + serializable:true, + get:function () { + return this._initSelect; + }, + set:function (newVal) { + this._initSelect = newVal; + this.tweenData.initSelect = newVal; + } + }, + prepareForDraw:{ value:function(){ - this.keyframe.selectKeyframe(); + if(this.initSelect){ + this.keyframe.selectKeyframe(); + this.initSelect = false; + } } }, @@ -200,6 +217,7 @@ var Tween = exports.Tween = Montage.create(Component, { this.tweenedProperties = this.tweenData.tweenedProperties; this.isTweenAnimated = this.tweenData.isTweenAnimated; this.easing = this.tweenData.easing; + this.initSelect = this.tweenData.initSelect; this.needsDraw = true; } }, -- cgit v1.2.3