From 57f5e9362d1f858495d20fbadd2c09fc39d1ffff Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 24 Jul 2012 10:06:08 -0700 Subject: FIX IK-1485 Fix 3D bug IK 1485 Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 11 +++++++++++ .../sections/three-d-view.reel/three-d-view.js | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index c9b59253..14ce3090 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -282,6 +282,8 @@ var Tween = exports.Tween = Montage.create(Component, { // ==== Begin Controllers setTweenProperties:{ value:function (eventDetail) { + console.log("EVENT DETAIL"); + console.log(eventDetail); if (eventDetail.source === "SelectionTool" || eventDetail.source === "timeline" || eventDetail.source === "pi" || eventDetail.source === "cssPanelChange") { if(this.parentComponent.parentComponent.animatedElement.offsetTop != this.tweenedProperties["top"]){ this.tweenedProperties["top"] = this.parentComponent.parentComponent.animatedElement.offsetTop + "px"; @@ -312,6 +314,15 @@ var Tween = exports.Tween = Montage.create(Component, { this.parentComponent.parentComponent.updateKeyframeRule(); this.isTweenAnimated = true; } + + if(eventDetail.source === "pi" && eventDetail.type === "setMatrix"){ + var piArrMat = eventDetail.data.value, + piStrTweenProperty = "perspective(1400) matrix3d(" + piArrMat.join() + ")"; + + this.tweenedProperties["-webkit-transform"] = piStrTweenProperty; + this.parentComponent.parentComponent.updateKeyframeRule(); + this.isTweenAnimated = true; + } } }, diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index f4c31f53..526bab5c 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js @@ -317,9 +317,9 @@ exports.ThreeD = Montage.create(Component, { } if(isChanging) { - this.application.ninja.elementMediator.setMatrix(item, mat, true); + this.application.ninja.elementMediator.setMatrix(item, mat, true, "pi"); } else { - this.application.ninja.elementMediator.setMatrix(item, mat, false); + this.application.ninja.elementMediator.setMatrix(item, mat, false, "pi"); if(!inGlobalMode) { value.value = 0; -- cgit v1.2.3