From fb71f5715a288b59d6b151c11a293e179d2c9ace Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 10 May 2012 10:04:26 -0700 Subject: Draw 3d compass at the bottom-left. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/draw-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js') diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js index f869f65e..f639521c 100755 --- a/js/helper-classes/3D/draw-utils.js +++ b/js/helper-classes/3D/draw-utils.js @@ -1171,7 +1171,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { var saveLineWidth = this._lineWidth; var origLeft = 50; - var origTop = 50; + var origTop = this.snapManager.getStageHeight() - 50; var mat = this.viewUtils.getMatrixFromElement( this._sourceSpaceElt ); var tMat = Matrix.Translation([origLeft,origTop,0]); @@ -1203,7 +1203,7 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, { this.setDrawingSurfaceElement(this.application.ninja.stage.layoutCanvas); // clear just the 3d compass area this._drawingContext.save(); - this._drawingContext.rect(0, 0, 100, 100); + this._drawingContext.rect(0, origTop-50, 100, 100); this._drawingContext.clip(); this._drawingContext.lineWidth = 2.0; -- cgit v1.2.3 From 2088ff54c96af4bd5c96075b74939b50c56f5f24 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 10 May 2012 12:01:16 -0700 Subject: New stage template should not distinguish between user and template body styles. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/body-controller.js | 6 +++--- js/controllers/styles-controller.js | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 943594f2..5c23dcf7 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -13,7 +13,7 @@ exports.BodyController = Montage.create(ElementController, { set3DProperties: { value: function(el, props, update3DModel) { var dist = props["dist"], mat = props["mat"]; - this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")", true); + this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); el.elementModel.props3D.matrix3d = mat; el.elementModel.props3D.perspectiveDist = dist; @@ -49,13 +49,13 @@ exports.BodyController = Montage.create(ElementController, { switch(p) { case "body-background": case "background": - this.application.ninja.stylesController.setElementStyle(el, "background-color", value, true); + this.application.ninja.stylesController.setElementStyle(el, "background-color", value); break; case "overflow": case "width": case "height": case "-webkit-transform-style": - this.application.ninja.stylesController.setElementStyle(el, p, value, true); + this.application.ninja.stylesController.setElementStyle(el, p, value); this.application.ninja.stage.updatedStage = true; break; default: diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 647c0870..7707a826 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js @@ -1130,6 +1130,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { getMatrixFromElement : { value: function(element, isStage) { + isStage = false; var xformStr = this.getElementStyle(element, "-webkit-transform", true, isStage), mat; @@ -1163,6 +1164,7 @@ var stylesController = exports.StylesController = Montage.create(Component, { getPerspectiveDistFromElement : { value: function(element, isStage) { + isStage = false; var xformStr = this.getElementStyle(element, "-webkit-perspective", false, isStage), dist; -- cgit v1.2.3