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') 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