mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 22:06:18 +02:00
Merge pull request #13410 from dback2/editHandleToggleFix
Fix toggling edit handles between local/world space
This commit is contained in:
commit
446b82abd6
2 changed files with 7 additions and 5 deletions
|
@ -1784,7 +1784,7 @@ var keyReleaseEvent = function (event) {
|
|||
deleteSelectedEntities();
|
||||
} else if (event.text === "ESC") {
|
||||
selectionManager.clearSelections();
|
||||
} else if (event.text === "TAB") {
|
||||
} else if (event.text === "t") {
|
||||
selectionDisplay.toggleSpaceMode();
|
||||
} else if (event.text === "f") {
|
||||
if (isActive) {
|
||||
|
|
|
@ -215,8 +215,10 @@ SelectionManager = (function() {
|
|||
that.worldRotation = properties.boundingBox.rotation;
|
||||
|
||||
that.entityType = properties.type;
|
||||
|
||||
SelectionDisplay.setSpaceMode(SPACE_LOCAL);
|
||||
|
||||
if (selectionUpdated) {
|
||||
SelectionDisplay.setSpaceMode(SPACE_LOCAL);
|
||||
}
|
||||
} else {
|
||||
that.localRotation = null;
|
||||
that.localDimensions = null;
|
||||
|
@ -1435,7 +1437,7 @@ SelectionDisplay = (function() {
|
|||
that.setHandleRotateYawVisible(!activeTool || isActiveTool(handleRotateYawRing));
|
||||
that.setHandleRotateRollVisible(!activeTool || isActiveTool(handleRotateRollRing));
|
||||
|
||||
var showScaleStretch = !activeTool && SelectionManager.selections.length === 1;
|
||||
var showScaleStretch = !activeTool && SelectionManager.selections.length === 1 && spaceMode === SPACE_LOCAL;
|
||||
that.setHandleStretchXVisible(showScaleStretch || isActiveTool(handleStretchXSphere));
|
||||
that.setHandleStretchYVisible(showScaleStretch || isActiveTool(handleStretchYSphere));
|
||||
that.setHandleStretchZVisible(showScaleStretch || isActiveTool(handleStretchZSphere));
|
||||
|
@ -2061,7 +2063,7 @@ SelectionDisplay = (function() {
|
|||
};
|
||||
|
||||
var onMove = function(event) {
|
||||
var proportional = (spaceMode === SPACE_WORLD) || directionEnum === STRETCH_DIRECTION.ALL;
|
||||
var proportional = directionEnum === STRETCH_DIRECTION.ALL;
|
||||
|
||||
var position, rotation;
|
||||
if (spaceMode === SPACE_LOCAL) {
|
||||
|
|
Loading…
Reference in a new issue