aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-06 11:28:16 -0800
committerNivesh Rajbhandari2012-03-06 11:28:16 -0800
commit2346d8ab9db06573d8672c64988c46b6c672e015 (patch)
tree2edfde6260bbb61ddb5764023baa131598bb377f /js/helper-classes
parentba62bfff53319ebf140663dc0bf8fbaf1692ff9a (diff)
downloadninja-2346d8ab9db06573d8672c64988c46b6c672e015.tar.gz
Create drag plane parallel to working plane and offset by where the user clicked in z.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js
index 596ba56a..5eef8b5c 100755
--- a/js/helper-classes/3D/snap-manager.js
+++ b/js/helper-classes/3D/snap-manager.js
@@ -1990,12 +1990,20 @@ var SnapManager = exports.SnapManager = Montage.create(Component, {
1990 }, 1990 },
1991 1991
1992 setupDragPlanes : { 1992 setupDragPlanes : {
1993 value: function( hitRec ) { 1993 value: function( hitRec, inGlobalMode ) {
1994 // get the location of the point in stage world space 1994 // get the location of the point in stage world space
1995 var elt = hitRec.getElt(); 1995 var elt = hitRec.getElt();
1996 var localPt = hitRec.getLocalPoint(); 1996 var localPt = hitRec.getLocalPoint();
1997 var planeMat = hitRec.getPlaneMatrix(); 1997 var planeMat = hitRec.getPlaneMatrix();
1998 var stageWorldPt = viewUtils.postViewToStageWorld( MathUtils.transformPoint(localPt,planeMat), elt ); 1998 var stageWorldPt;
1999 if(inGlobalMode)
2000 {
2001 stageWorldPt = MathUtils.transformPoint(localPt,planeMat);
2002 }
2003 else
2004 {
2005 stageWorldPt = viewUtils.postViewToStageWorld( MathUtils.transformPoint(localPt,planeMat), elt );
2006 }
1999 2007
2000 /* 2008 /*
2001 // get a working plane parallel to the current working plane through the stage world point 2009 // get a working plane parallel to the current working plane through the stage world point