mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-26 02:55:25 +02:00
Merge pull request #13265 from wayne-chen/toggleSpaceMode
Re-adding toggleSpaceMode function
This commit is contained in:
commit
067fa46355
1 changed files with 23 additions and 0 deletions
|
@ -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) {
|
function addHandleTool(overlay, tool) {
|
||||||
handleTools[overlay] = tool;
|
handleTools[overlay] = tool;
|
||||||
return tool;
|
return tool;
|
||||||
|
|
Loading…
Reference in a new issue