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

@ -201,8 +201,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;
@ -1401,7 +1403,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));
@ -2059,7 +2061,7 @@ SelectionDisplay = (function() {
};
var onMove = function(event) {
var proportional = (spaceMode === SPACE_WORLD) || directionEnum === STRETCH_DIRECTION.ALL;
var proportional = directionEnum === STRETCH_DIRECTION.ALL;
var position, dimensions, rotation;
if (spaceMode === SPACE_LOCAL) {