mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +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();
|
deleteSelectedEntities();
|
||||||
} else if (event.text === "ESC") {
|
} else if (event.text === "ESC") {
|
||||||
selectionManager.clearSelections();
|
selectionManager.clearSelections();
|
||||||
} else if (event.text === "TAB") {
|
} else if (event.text === "t") {
|
||||||
selectionDisplay.toggleSpaceMode();
|
selectionDisplay.toggleSpaceMode();
|
||||||
} else if (event.text === "f") {
|
} else if (event.text === "f") {
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
|
|
|
@ -215,8 +215,10 @@ SelectionManager = (function() {
|
||||||
that.worldRotation = properties.boundingBox.rotation;
|
that.worldRotation = properties.boundingBox.rotation;
|
||||||
|
|
||||||
that.entityType = properties.type;
|
that.entityType = properties.type;
|
||||||
|
|
||||||
SelectionDisplay.setSpaceMode(SPACE_LOCAL);
|
if (selectionUpdated) {
|
||||||
|
SelectionDisplay.setSpaceMode(SPACE_LOCAL);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
that.localRotation = null;
|
that.localRotation = null;
|
||||||
that.localDimensions = null;
|
that.localDimensions = null;
|
||||||
|
@ -1435,7 +1437,7 @@ SelectionDisplay = (function() {
|
||||||
that.setHandleRotateYawVisible(!activeTool || isActiveTool(handleRotateYawRing));
|
that.setHandleRotateYawVisible(!activeTool || isActiveTool(handleRotateYawRing));
|
||||||
that.setHandleRotateRollVisible(!activeTool || isActiveTool(handleRotateRollRing));
|
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.setHandleStretchXVisible(showScaleStretch || isActiveTool(handleStretchXSphere));
|
||||||
that.setHandleStretchYVisible(showScaleStretch || isActiveTool(handleStretchYSphere));
|
that.setHandleStretchYVisible(showScaleStretch || isActiveTool(handleStretchYSphere));
|
||||||
that.setHandleStretchZVisible(showScaleStretch || isActiveTool(handleStretchZSphere));
|
that.setHandleStretchZVisible(showScaleStretch || isActiveTool(handleStretchZSphere));
|
||||||
|
@ -2061,7 +2063,7 @@ SelectionDisplay = (function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
var onMove = function(event) {
|
var onMove = function(event) {
|
||||||
var proportional = (spaceMode === SPACE_WORLD) || directionEnum === STRETCH_DIRECTION.ALL;
|
var proportional = directionEnum === STRETCH_DIRECTION.ALL;
|
||||||
|
|
||||||
var position, rotation;
|
var position, rotation;
|
||||||
if (spaceMode === SPACE_LOCAL) {
|
if (spaceMode === SPACE_LOCAL) {
|
||||||
|
|
Loading…
Reference in a new issue