fix toggling to world space

This commit is contained in:
David Back 2018-06-18 15:55:55 -07:00
parent 87d26a9d86
commit 030e697945

View file

@ -202,7 +202,9 @@ SelectionManager = (function() {
that.entityType = properties.type; that.entityType = properties.type;
if (selectionUpdated) {
SelectionDisplay.setSpaceMode(SPACE_LOCAL); SelectionDisplay.setSpaceMode(SPACE_LOCAL);
}
} else { } else {
that.localRotation = null; that.localRotation = null;
that.localDimensions = null; that.localDimensions = null;
@ -1401,7 +1403,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));
@ -2059,7 +2061,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, dimensions, rotation; var position, dimensions, rotation;
if (spaceMode === SPACE_LOCAL) { if (spaceMode === SPACE_LOCAL) {