diff options
author | hwc487 | 2012-04-26 12:50:57 -0700 |
---|---|---|
committer | hwc487 | 2012-04-26 12:50:57 -0700 |
commit | 4b83774cdbfbf30add9a8fa2f11b1c4ff35179fa (patch) | |
tree | c8bdc04b07d9b1193ae8a553cf8d570d19a852ca /js/helper-classes/3D | |
parent | 34e6aa5a76fb49c3d9251cedf128c6ed971abb5c (diff) | |
download | ninja-4b83774cdbfbf30add9a8fa2f11b1c4ff35179fa.tar.gz |
canvas interaction
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 10 |
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 |