mirror of
https://github.com/overte-org/overte.git
synced 2025-08-14 15:10:18 +02:00
Prevent invalid direct / handle scaling transition while scaling
This commit is contained in:
parent
5551bb70d4
commit
880a711d2b
1 changed files with 9 additions and 1 deletions
|
@ -1334,6 +1334,10 @@
|
|||
&& (rootEntityID === undefined || rootEntityID === selection.rootEntityID());
|
||||
}
|
||||
|
||||
function isScaling() {
|
||||
return editorState === EDITOR_DIRECT_SCALING || editorState === EDITOR_HANDLE_SCALING;
|
||||
}
|
||||
|
||||
function startEditing() {
|
||||
var selectionPositionAndOrientation;
|
||||
|
||||
|
@ -1917,6 +1921,7 @@
|
|||
hoverHandle: hoverHandle,
|
||||
isHandle: isHandle,
|
||||
isEditing: isEditing,
|
||||
isScaling: isScaling,
|
||||
startDirectScaling: startDirectScaling,
|
||||
updateDirectScaling: updateDirectScaling,
|
||||
stopDirectScaling: stopDirectScaling,
|
||||
|
@ -1966,7 +1971,10 @@
|
|||
}
|
||||
|
||||
function onGripClicked() {
|
||||
isAppScaleWithHandles = !isAppScaleWithHandles;
|
||||
// Do not change scale mode if are currently scaling.
|
||||
if (!editors[LEFT_HAND].isScaling() && !editors[RIGHT_HAND].isScaling()) {
|
||||
isAppScaleWithHandles = !isAppScaleWithHandles;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue