From 952e0b2c28af081041fa8987c3e865b931d052fa Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 9 Apr 2012 16:04:24 -0700 Subject: Single perspective fix. Note that rotating multiple objects when the stage is rotated still doesn't work and flatten still doesn't work. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/stage-controller.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'js/controllers/elements/stage-controller.js') diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js index dc916b1a..f376e40f 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js @@ -90,7 +90,7 @@ exports.StageController = Montage.create(ElementController, { return el.elementModel.stageView.style.getProperty(p); } default: - return ElementController.getProperty(el, p, false, true); + return ElementController.getProperty(el, p, true, true); //console.log("Undefined Stage property ", p); } } @@ -119,6 +119,7 @@ exports.StageController = Montage.create(ElementController, { break; case "-webkit-transform-style": el.elementModel.stageView.style.setProperty(p, value); + this.application.ninja.stage.updatedStage = true; break; default: console.log("Undefined property ", p, "for the Stage Controller"); @@ -178,5 +179,20 @@ exports.StageController = Montage.create(ElementController, { return mat; } } - } + }, + + getPerspectiveDist: { + value: function(el) { + if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) + { + return el.elementModel.props3D.perspectiveDist; + } + else + { + var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, true); + el.elementModel.props3D.perspectiveDist = dist; + return dist; + } + } + }, }); -- cgit v1.2.3