From 75bca514358ed90b8b4274bafed9422c82695776 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 22 Feb 2012 11:58:45 -0800 Subject: Integrating Zoom tool fixes. Signed-off-by: Nivesh Rajbhandari --- 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 From 3285038757aed8bf200fb6a97ebbf2f49a998869 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 22 Feb 2012 12:12:44 -0800 Subject: Removing unused method that was using snapManager. Signed-off-by: Nivesh Rajbhandari --- js/helper-classes/3D/view-utils.js | 8 -------- 1 file changed, 8 deletions(-) (limited to 'js/helper-classes/3D') diff --git a/js/helper-classes/3D/view-utils.js b/js/helper-classes/3D/view-utils.js index bedda8bf..a2fac34f 100755 --- a/js/helper-classes/3D/view-utils.js +++ b/js/helper-classes/3D/view-utils.js @@ -1226,14 +1226,6 @@ 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 From aaa8d05cc3cfd94322d356e265b94b0abb9f6305 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 23 Feb 2012 01:52:34 -0800 Subject: renaming makeElementModel2 to makeModelFromElement Signed-off-by: Valerio Virgillito --- js/helper-classes/3D/snap-manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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..2922edf9 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js @@ -521,7 +521,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { if (!elt.elementModel) { - NJUtils.makeElementModel2(elt); + NJUtils.makeModelFromElement(elt); } elt.elementModel.isIn2DSnapCache = true; } @@ -588,7 +588,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { if (!elt.elementModel) { - NJUtils.makeElementModel2(elt); + NJUtils.makeModelFromElement(elt); } elt.elementModel.isIn2DSnapCache = true; } -- cgit v1.2.3