From 9d3589feb0174c09d1c1bac405660f8900259c7d Mon Sep 17 00:00:00 2001 From: hwc487 Date: Wed, 22 Feb 2012 04:44:07 -0800 Subject: Adding bug fixes. --- js/helper-classes/3D/snap-manager.js | 1 + js/helper-classes/3D/view-utils.js | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'js/helper-classes/3D') diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index 0a950658..ada6960b 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js @@ -1087,6 +1087,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { // we need to check the orientation of the bounds var nrm = MathUtils.getNormalFromBounds3D( bounds3D ); + if (MathUtils.fpSign(nrm[2]) == 0) return null; var zNrm = nrm[2]; var dist; diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index a2fac34f..bedda8bf 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js @@ -1226,6 +1226,14 @@ exports.ViewUtils = Montage.create(Component, { } }, + getCurrentDocument: + { + value: function() + { + return snapManagerModule.SnapManager.application.ninja.currentDocument; + } + }, + setStageZoom: { value:function( globalPt, zoomFactor ) { var localPt; -- cgit v1.2.3