From d262bb9b0c49b7bcb9fd1b429abcf6d38b39ddf6 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 1 May 2012 16:40:22 -0700 Subject: Offset side and top working planes by half the stage width/height. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/snap-manager.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'js/helper-classes/3D/snap-manager.js') diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 7fc492a5..f4bfc12b 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js @@ -1617,7 +1617,11 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { if (x > y) { if (x > z) { plane[0] = 1; - plane[3] = this.getStageWidth() / 2.0; + if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { + plane[3] = stage.scrollWidth / 2.0; + } else { + plane[3] = this.getStageWidth() / 2.0; + } if (dir[0] > 0) plane[3] = -plane[3]; change = !drawUtils.drawYZ; drawUtils.drawXY = drawUtils.drawXZ = false; @@ -1635,7 +1639,11 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { else { if (y > z) { plane[1] = 1; - plane[3] = this.getStageHeight() / 2.0; + if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { + plane[3] = stage.scrollHeight / 2.0; + } else { + plane[3] = this.getStageHeight() / 2.0; + } if (dir[1] > 0) plane[3] = -plane[3]; change = !drawUtils.drawXZ; drawUtils.drawXY = drawUtils.drawYZ = false; -- cgit v1.2.3 From 8f8f7f9a36fb9abadea2a9f25aef0084946bebc9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 4 May 2012 14:42:00 -0700 Subject: Removed special-casing for new template workflow. Instead, we will enforce a width and height on the body in order to do 3d. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/snap-manager.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'js/helper-classes/3D/snap-manager.js') diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index f4bfc12b..31e3e540 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js @@ -1617,11 +1617,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { if (x > y) { if (x > z) { plane[0] = 1; - if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { - plane[3] = stage.scrollWidth / 2.0; - } else { - plane[3] = this.getStageWidth() / 2.0; - } + plane[3] = this.getStageWidth() / 2.0; if (dir[0] > 0) plane[3] = -plane[3]; change = !drawUtils.drawYZ; drawUtils.drawXY = drawUtils.drawXZ = false; @@ -1639,11 +1635,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { else { if (y > z) { plane[1] = 1; - if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { - plane[3] = stage.scrollHeight / 2.0; - } else { - plane[3] = this.getStageHeight() / 2.0; - } + plane[3] = this.getStageHeight() / 2.0; if (dir[1] > 0) plane[3] = -plane[3]; change = !drawUtils.drawXZ; drawUtils.drawXY = drawUtils.drawYZ = false; -- cgit v1.2.3