aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/helper-classes/3D/snap-manager.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 8819f637..7e1260bf 100644
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -977,7 +977,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
977 viewUtils.setViewportObj( stage ); 977 viewUtils.setViewportObj( stage );
978 978
979 MathUtils.makeDimension3( screenPt ); 979 MathUtils.makeDimension3( screenPt );
980 this.hSnapToElements( stage, screenPt, hitRecs, 0, screenPt ); 980 this.hSnapToElements( stage, hitRecs, 0, screenPt );
981 981
982 return; 982 return;
983 } 983 }
@@ -985,7 +985,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
985 985
986 hSnapToElements : 986 hSnapToElements :
987 { 987 {
988 value: function( elt, parentPt, hitRecs, depth, globalScrPt ) 988 value: function( elt, hitRecs, depth, globalScrPt )
989 { 989 {
990 // hit test the current object 990 // hit test the current object
991 var hit; 991 var hit;
@@ -994,8 +994,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
994 // if the element is in the 2D cache snapping is done there 994 // if the element is in the 2D cache snapping is done there
995 if (elt.elementModel && !elt.elementModel.isIn2DSnapCache) 995 if (elt.elementModel && !elt.elementModel.isIn2DSnapCache)
996 { 996 {
997 var scrPt = viewUtils.parentToChild( parentPt, elt, false ); 997 hit = this.snapToElement( elt, globalScrPt );
998 hit = this.snapToElement( elt, scrPt, globalScrPt );
999 if (hit) 998 if (hit)
1000 { 999 {
1001 //hitRecs.push( hit ); 1000 //hitRecs.push( hit );
@@ -1017,14 +1016,14 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1017 } 1016 }
1018 // test the rest of the tree 1017 // test the rest of the tree
1019 var n = elt.childElementCount; 1018 var n = elt.childElementCount;
1020 var eltPt = viewUtils.parentToChild( parentPt, elt, true ); 1019 //var eltPt = viewUtils.parentToChild( parentPt, elt, true );
1021 if (n > 0) 1020 if (n > 0)
1022 { 1021 {
1023 for (var i=0; i<n; i++) 1022 for (var i=0; i<n; i++)
1024 { 1023 {
1025 var child = elt.children[i]; 1024 var child = elt.children[i];
1026 //var childPt = viewUtils.parentToChild( scrPt, child ); 1025 //var childPt = viewUtils.parentToChild( scrPt, child );
1027 hit = this.hSnapToElements( child, eltPt, hitRecs, (depth+1), globalScrPt ); 1026 hit = this.hSnapToElements( child, hitRecs, (depth+1), globalScrPt );
1028 if (hit) 1027 if (hit)
1029 { 1028 {
1030 //hitRecs.push( hit ); 1029 //hitRecs.push( hit );
@@ -1044,7 +1043,7 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1044 1043
1045 snapToElement : 1044 snapToElement :
1046 { 1045 {
1047 value: function( elt, scrPt, globalScrPt ) 1046 value: function( elt, globalScrPt )
1048 { 1047 {
1049 if (this.isAvoidedElement(elt) ) return null; 1048 if (this.isAvoidedElement(elt) ) return null;
1050 1049