diff options
author | Nivesh Rajbhandari | 2012-03-12 17:06:05 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-03-12 17:06:05 -0700 |
commit | 9d885aae7a17b4fc731a41f6b1ac8840092b83ac (patch) | |
tree | 4e2fd901492df729cac529ca5fa924d90582fd4e /js/helper-classes/3D | |
parent | 5fb358d9e80a364d5f300d60b7a9fe0f773741e7 (diff) | |
download | ninja-9d885aae7a17b4fc731a41f6b1ac8840092b83ac.tar.gz |
Fixing snapping bugs in Selection, translate and rotate tools.
We should show snap marker on mouse move for selection tool prior to mousing down as well.
We should create drag plane parallel to the view and where the user moused down.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 12 |
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 cf8a91db..1caacd00 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js | |||
@@ -1978,12 +1978,20 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
1978 | }, | 1978 | }, |
1979 | 1979 | ||
1980 | setupDragPlanes : { | 1980 | setupDragPlanes : { |
1981 | value: function( hitRec ) { | 1981 | value: function( hitRec, inGlobalMode ) { |
1982 | // get the location of the point in stage world space | 1982 | // get the location of the point in stage world space |
1983 | var elt = hitRec.getElt(); | 1983 | var elt = hitRec.getElt(); |
1984 | var localPt = hitRec.getLocalPoint(); | 1984 | var localPt = hitRec.getLocalPoint(); |
1985 | var planeMat = hitRec.getPlaneMatrix(); | 1985 | var planeMat = hitRec.getPlaneMatrix(); |
1986 | var stageWorldPt = viewUtils.postViewToStageWorld( MathUtils.transformPoint(localPt,planeMat), elt ); | 1986 | var stageWorldPt; |
1987 | if(inGlobalMode) | ||
1988 | { | ||
1989 | stageWorldPt = MathUtils.transformPoint(localPt,planeMat); | ||
1990 | } | ||
1991 | else | ||
1992 | { | ||
1993 | stageWorldPt = viewUtils.postViewToStageWorld( MathUtils.transformPoint(localPt,planeMat), elt ); | ||
1994 | } | ||
1987 | 1995 | ||
1988 | /* | 1996 | /* |
1989 | // get a working plane parallel to the current working plane through the stage world point | 1997 | // get a working plane parallel to the current working plane through the stage world point |