aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D/snap-manager.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-04-18 11:24:18 -0700
committerNivesh Rajbhandari2012-04-18 11:24:18 -0700
commite2510cba3b75bba78c587d784f39c137c1618369 (patch)
treee35fccf09cd5d59c6dcc2ad48cddd94f620bb554 /js/helper-classes/3D/snap-manager.js
parent7372dd9aa32e404b971efb78c354a9cdfc86c212 (diff)
parentd6d72e8f519f3eb69374eb233149d3dfde2e5558 (diff)
downloadninja-e2510cba3b75bba78c587d784f39c137c1618369.tar.gz
Merge branch 'refs/heads/Snapping_II' into EricMerge
Diffstat (limited to 'js/helper-classes/3D/snap-manager.js')
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 02e81a62..cd8cc102 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -306,6 +306,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
306 this.deactivateDragPlane(); 306 this.deactivateDragPlane();
307 307
308 this.setLastHit( rtnHit ); 308 this.setLastHit( rtnHit );
309
310 //rtnHit.test(); // DEBUG CODE. REMOVE THIS
309 return rtnHit; 311 return rtnHit;
310 } 312 }
311 }, 313 },
@@ -1086,15 +1088,6 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1086 localPt = MathUtils.transformPoint( localPt, inv ); 1088 localPt = MathUtils.transformPoint( localPt, inv );
1087 var hitContained = false; 1089 var hitContained = false;
1088 hitContained = this.snapToContainedElements( hitRec, localPt, globalScrPt ); 1090 hitContained = this.snapToContainedElements( hitRec, localPt, globalScrPt );
1089
1090 // disable snapping to element bounds when the object isnot selected
1091 if (!hitContained && !this.application.ninja.selectionController.isObjectSelected(elt))
1092 {
1093 if ((hitRec.getType() == hitRec.SNAP_TYPE_ELEMENT_EDGE) ||
1094 (hitRec.getType() == hitRec.SNAP_TYPE_ELEMENT_VERTEX) ||
1095 (hitRec.getType() == hitRec.SNAP_TYPE_ELEMENT))
1096 hitRec = null;
1097 }
1098 } 1091 }
1099 1092
1100 return hitRec; 1093 return hitRec;