From b2f3131262d4f3f1922b7a9bc7d5b4da33a9ae11 Mon Sep 17 00:00:00 2001 From: Wayne Chen Date: Fri, 25 May 2018 09:46:52 -0700 Subject: [PATCH] readding the function --- .../system/libraries/entitySelectionTool.js | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/scripts/system/libraries/entitySelectionTool.js b/scripts/system/libraries/entitySelectionTool.js index d03d4477f7..1b41559160 100644 --- a/scripts/system/libraries/entitySelectionTool.js +++ b/scripts/system/libraries/entitySelectionTool.js @@ -1036,6 +1036,29 @@ SelectionDisplay = (function() { } }; + // FUNCTION: TOGGLE SPACE MODE + that.toggleSpaceMode = function() { + var wantDebug = false; + if (wantDebug) { + print("========> ToggleSpaceMode called. ========="); + } + if ((spaceMode === SPACE_WORLD) && (SelectionManager.selections.length > 1)) { + if (wantDebug) { + print("Local space editing is not available with multiple selections"); + } + return; + } + if (wantDebug) { + print("PreToggle: " + spaceMode); + } + spaceMode = (spaceMode === SPACE_LOCAL) ? SPACE_WORLD : SPACE_LOCAL; + that.updateHandles(); + if (wantDebug) { + print("PostToggle: " + spaceMode); + print("======== ToggleSpaceMode called. <========="); + } + }; + function addHandleTool(overlay, tool) { handleTools[overlay] = tool; return tool;