diff options
author | hwc487 | 2012-04-27 13:52:40 -0700 |
---|---|---|
committer | hwc487 | 2012-04-27 13:52:40 -0700 |
commit | e73fba18b095f0c270f5d954e5993c155b488c73 (patch) | |
tree | da18c6c0117fec3652b823bddc198add47632fc8 /js/helper-classes/3D | |
parent | 4b83774cdbfbf30add9a8fa2f11b1c4ff35179fa (diff) | |
download | ninja-e73fba18b095f0c270f5d954e5993c155b488c73.tar.gz |
Creating shapes in a container
Diffstat (limited to 'js/helper-classes/3D')
-rwxr-xr-x | js/helper-classes/3D/snap-manager.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/helper-classes/3D/snap-manager.js b/js/helper-classes/3D/snap-manager.js index dcfd5ddc..7fc492a5 100755 --- a/js/helper-classes/3D/snap-manager.js +++ b/js/helper-classes/3D/snap-manager.js | |||
@@ -1011,7 +1011,8 @@ var SnapManager = exports.SnapManager = Montage.create(Component, { | |||
1011 | } | 1011 | } |
1012 | // hit test the current object | 1012 | // hit test the current object |
1013 | var hit; | 1013 | var hit; |
1014 | if (depth > 0) // don't snap to the root | 1014 | var snapToStage = ((depth === 0) && (elt === this.application.ninja.currentSelectedContainer) && (elt.nodeName === 'CANVAS')); |
1015 | if ((depth > 0) || snapToStage) // don't snap to the root unles we are working inside a canvas | ||
1015 | { | 1016 | { |
1016 | // if the element is in the 2D cache snapping is done there | 1017 | // if the element is in the 2D cache snapping is done there |
1017 | if (elt.elementModel && !elt.elementModel.isIn2DSnapCache) | 1018 | if (elt.elementModel && !elt.elementModel.isIn2DSnapCache) |