From af93c604649d99fc81dc92b042794b0c60fc4f2d Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Wed, 14 Mar 2012 09:14:50 -0700 Subject: Optimize Tween component needsDraw calls Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'js/panels/Timeline/Tween.reel') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 77c0dfa8..2b308d9a 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -44,7 +44,6 @@ var Tween = exports.Tween = Montage.create(Component, { }, set: function(value){ this._spanWidth = value; - this.needsDraw = true; } }, @@ -59,7 +58,6 @@ var Tween = exports.Tween = Montage.create(Component, { }, set:function (value) { this._spanPosition = value; - this.needsDraw = true; } }, @@ -74,7 +72,6 @@ var Tween = exports.Tween = Montage.create(Component, { }, set:function (value) { this._keyFramePosition = value; - this.needsDraw = true; } }, @@ -133,7 +130,6 @@ var Tween = exports.Tween = Montage.create(Component, { }, set:function (value) { this._isTweenAnimated = value; - this.needsDraw = true; } }, @@ -157,6 +153,7 @@ var Tween = exports.Tween = Montage.create(Component, { this.tweenID = this.tweenData.tweenID; this.tweenedProperties = this.tweenData.tweenedProperties; this.isTweenAnimated = this.tweenData.isTweenAnimated; + this.needsDraw = true; } }, -- cgit v1.2.3 From a11ef2eed7049835c8bdfa50a2b893632c46eaa0 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 4 Apr 2012 11:11:58 -0700 Subject: Squashed commit of Preparing for the montage undo-manager: Architecture changes Reworked the add and remove elements into 1 function which can take 1 or more elements. Removed the _element from the selection array Many other changes related to those 2 changes Undo/Redo shortcuts are now using montage undo/redo manager. Signed-off-by: Valerio Virgillito --- js/panels/Timeline/Tween.reel/Tween.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels/Timeline/Tween.reel') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 2b308d9a..7339139f 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -162,7 +162,7 @@ var Tween = exports.Tween = Montage.create(Component, { if (event.detail.source && event.detail.source !== "tween") { // check for correct element selection - if (this.application.ninja.selectedElements[0]._element != this.parentComponent.parentComponent.animatedElement) { + if (this.application.ninja.selectedElements[0]!= this.parentComponent.parentComponent.animatedElement) { console.log("Wrong element selected for this keyframe track"); } else { // update tweenedProperties and tell containing track to update CSS rule -- cgit v1.2.3