From 52fac825174d16e3ff6875fc497d3f3cfaf4812c Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 21 Mar 2012 12:02:36 -0700 Subject: Get matrix and perspective distance from styles controller. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/stage-controller.js | 7 +++---- 1 file changed, 3 insertions(+), 4 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 97ea3aa5..2734e226 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js @@ -143,11 +143,10 @@ exports.StageController = Montage.create(ElementController, { if (el) { - var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform"); - if (xformStr) - mat = this.transformStringToMat( xformStr ); - if (!mat) + mat = this.application.ninja.stylesController.getMatrixFromElement(el, true); + if (!mat) { mat = Matrix.I(4); + } var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom"); if (zoom) -- cgit v1.2.3 From bda9f8f5829c943486f8850e68c991e83f8fb8c8 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Sat, 24 Mar 2012 13:50:46 -0700 Subject: Adding logic for flatten checkbox in PI. This requires minor modifications to both StageController and ComponentController. Also removing unused global3DSettings CSS. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/stage-controller.js | 5 +++++ 1 file changed, 5 insertions(+) (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 2734e226..f2c8fa2d 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js @@ -83,6 +83,8 @@ exports.StageController = Montage.create(ElementController, { return el.elementModel.stageDimension.style.getProperty(p); case "width": return el.elementModel.stageDimension.style.getProperty(p); + case "-webkit-transform-style": + return el.elementModel.stageView.style.getProperty(p); default: return ElementController.getProperty(el, p, false, true); //console.log("Undefined Stage property ", p); @@ -111,6 +113,9 @@ exports.StageController = Montage.create(ElementController, { this.application.ninja.currentDocument.iframe.height = parseInt(value) + 400; el.elementModel.stageDimension.style.setProperty(p, value); break; + case "-webkit-transform-style": + el.elementModel.stageView.style.setProperty(p, value); + break; default: console.log("Undefined property ", p, "for the Stage Controller"); } -- cgit v1.2.3 From b1eb3f5cc37f6e58e765f24221c3f0445a3ee75a Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 27 Mar 2012 10:50:06 -0700 Subject: Check for Viewport case in StageController styles lookup. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/stage-controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (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 f2c8fa2d..dc916b1a 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js @@ -84,7 +84,11 @@ exports.StageController = Montage.create(ElementController, { case "width": return el.elementModel.stageDimension.style.getProperty(p); case "-webkit-transform-style": - return el.elementModel.stageView.style.getProperty(p); + if(el.id === "Viewport") { + return this.application.ninja.stylesController.getElementStyle(el, p, false, true); + } else { + return el.elementModel.stageView.style.getProperty(p); + } default: return ElementController.getProperty(el, p, false, true); //console.log("Undefined Stage property ", p); -- cgit v1.2.3