aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes/3D
diff options
context:
space:
mode:
authorhwc4872012-04-26 12:50:57 -0700
committerhwc4872012-04-26 12:50:57 -0700
commit4b83774cdbfbf30add9a8fa2f11b1c4ff35179fa (patch)
treec8bdc04b07d9b1193ae8a553cf8d570d19a852ca /js/helper-classes/3D
parent34e6aa5a76fb49c3d9251cedf128c6ed971abb5c (diff)
downloadninja-4b83774cdbfbf30add9a8fa2f11b1c4ff35179fa.tar.gz
canvas interaction
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 2c975985..dcfd5ddc 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -948,7 +948,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
948 { 948 {
949 949
950 // see if we can snap to a contained geometry object 950 // see if we can snap to a contained geometry object
951 if (hitRec && this.getGLWorld(elt) && !this.isARectangle(elt)) 951 if (hitRec && this.getGLWorld(elt)) // && !this.isARectangle(elt))
952 { 952 {
953 var localPt = hitRec.calculateElementWorldPoint(); 953 var localPt = hitRec.calculateElementWorldPoint();
954 if (hitRec.getType() != hitRec.SNAP_TYPE_ELEMENT) 954 if (hitRec.getType() != hitRec.SNAP_TYPE_ELEMENT)
@@ -1346,13 +1346,13 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1346 var dist = vecUtils.vecDist(2, globalPt, targetScrPt ); 1346 var dist = vecUtils.vecDist(2, globalPt, targetScrPt );
1347 if (dist < this.ELEMENT_VERTEX_HIT_RAD) 1347 if (dist < this.ELEMENT_VERTEX_HIT_RAD)
1348 { 1348 {
1349 console.log( "hit a vertex" ); 1349 //console.log( "hit a vertex" );
1350 1350
1351 // check if the distance is less than 1351 // check if the distance is less than
1352 // the distance on the current hit record 1352 // the distance on the current hit record
1353 if (dist <= vecUtils.vecDist(2, targetScrPt, hitRec.getScreenPoint() )) 1353 //if (dist <= vecUtils.vecDist(2, targetScrPt, hitRec.getScreenPoint() ))
1354 { 1354 {
1355 console.log( "rejected - further than existing snap" ); 1355 //console.log( "rejected - further than existing snap" );
1356 1356
1357 hitRec.setScreenPoint( globalPt ); 1357 hitRec.setScreenPoint( globalPt );
1358 //var localMatInv = hitRec.getPlaneMatrix().inverse(); 1358 //var localMatInv = hitRec.getPlaneMatrix().inverse();
@@ -1388,7 +1388,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1388 var dist = vecUtils.vecDist(2, globalPt, targetScrPt ); 1388 var dist = vecUtils.vecDist(2, globalPt, targetScrPt );
1389 if (dist < this.ELEMENT_EDGE_HIT_RAD) 1389 if (dist < this.ELEMENT_EDGE_HIT_RAD)
1390 { 1390 {
1391 console.log( "hit an edge" ); 1391 //console.log( "hit an edge" );
1392 1392
1393 // check if the distance is less than 1393 // check if the distance is less than
1394 // the distance on the current hit record 1394 // the distance on the current hit record