diff options
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 7fc492a5..6766ac7f 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, { | |||
1617 | if (x > y) { | 1617 | if (x > y) { |
1618 | if (x > z) { | 1618 | if (x > z) { |
1619 | plane[0] = 1; | 1619 | plane[0] = 1; |
1620 | plane[3] = this.getStageWidth() / 2.0; | 1620 | if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { |
1621 | plane[3] = stage.scrollWidth / 2.0; | ||
1622 | } else { | ||
1623 | plane[3] = this.getStageWidth() / 2.0; | ||
1624 | } | ||
1621 | if (dir[0] > 0) plane[3] = -plane[3]; | 1625 | if (dir[0] > 0) plane[3] = -plane[3]; |
1622 | change = !drawUtils.drawYZ; | 1626 | change = !drawUtils.drawYZ; |
1623 | drawUtils.drawXY = drawUtils.drawXZ = false; | 1627 | drawUtils.drawXY = drawUtils.drawXZ = false; |
@@ -1635,7 +1639,11 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
1635 | else { | 1639 | else { |
1636 | if (y > z) { | 1640 | if (y > z) { |
1637 | plane[1] = 1; | 1641 | plane[1] = 1; |
1638 | plane[3] = this.getStageHeight() / 2.0; | 1642 | if(this.application.ninja.currentDocument.documentRoot.id !== "UserContent") { |
1643 | plane[3] = stage.scrollHeight / 2.0; | ||
1644 | } else { | ||
1645 | plane[3] = this.getStageHeight() / 2.0; | ||
1646 | } | ||
1639 | if (dir[1] > 0) plane[3] = -plane[3]; | 1647 | if (dir[1] > 0) plane[3] = -plane[3]; |
1640 | change = !drawUtils.drawXZ; | 1648 | change = !drawUtils.drawXZ; |
1641 | drawUtils.drawXY = drawUtils.drawYZ = false; | 1649 | drawUtils.drawXY = drawUtils.drawYZ = false; |
@@ -1949,6 +1957,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
1949 | var localPt = hitRec.getLocalPoint(); | 1957 | var localPt = hitRec.getLocalPoint(); |
1950 | var planeMat = hitRec.getPlaneMatrix(); | 1958 | var planeMat = hitRec.getPlaneMatrix(); |
1951 | var stageWorldPt; | 1959 | var stageWorldPt; |
1960 | |||
1961 | /* | ||
1952 | if(inGlobalMode) | 1962 | if(inGlobalMode) |
1953 | { | 1963 | { |
1954 | stageWorldPt = MathUtils.transformPoint(localPt,planeMat); | 1964 | stageWorldPt = MathUtils.transformPoint(localPt,planeMat); |
@@ -1957,6 +1967,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
1957 | { | 1967 | { |
1958 | stageWorldPt = viewUtils.postViewToStageWorld( MathUtils.transformPoint(localPt,planeMat), elt ); | 1968 | stageWorldPt = viewUtils.postViewToStageWorld( MathUtils.transformPoint(localPt,planeMat), elt ); |
1959 | } | 1969 | } |
1970 | */ | ||
1971 | stageWorldPt = viewUtils.postViewToStageWorld( MathUtils.transformPoint(localPt,planeMat), elt ); | ||
1960 | 1972 | ||
1961 | /* | 1973 | /* |
1962 | // get a working plane parallel to the current working plane through the stage world point | 1974 | // get a working plane parallel to the current working plane through the stage world point |