mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 07:37:29 +02:00
Fix old scale handles displaying when switch hands
This commit is contained in:
parent
0f64da23bd
commit
ce6e711f2d
1 changed files with 7 additions and 2 deletions
|
@ -238,6 +238,7 @@
|
|||
ZERO_ROTATION = Quat.fromVec3Radians(Vec3.ZERO),
|
||||
DISTANCE_MULTIPLIER_MULTIPLIER = 0.5,
|
||||
hoveredOverlayID = null,
|
||||
isVisible = false,
|
||||
|
||||
// Scaling.
|
||||
scalingBoundingBoxDimensions,
|
||||
|
@ -367,6 +368,8 @@
|
|||
faceHandleDimensions,
|
||||
i;
|
||||
|
||||
isVisible = true;
|
||||
|
||||
boundingBoxDimensions = boundingBox.dimensions;
|
||||
boundingBoxCenter = boundingBox.center;
|
||||
boundingBoxLocalCenter = boundingBox.localCenter;
|
||||
|
@ -505,7 +508,7 @@
|
|||
for (i = 0, length = cornerHandleOverlays.length; i < length; i += 1) {
|
||||
overlay = cornerHandleOverlays[i];
|
||||
Overlays.editOverlay(overlay, {
|
||||
visible: isShowAll || overlay === overlayID,
|
||||
visible: isVisible && (isShowAll || overlay === overlayID),
|
||||
color: color
|
||||
});
|
||||
}
|
||||
|
@ -513,7 +516,7 @@
|
|||
for (i = 0, length = faceHandleOverlays.length; i < length; i += 1) {
|
||||
overlay = faceHandleOverlays[i];
|
||||
Overlays.editOverlay(overlay, {
|
||||
visible: isShowAll || overlay === overlayID,
|
||||
visible: isVisible && (isShowAll || overlay === overlayID),
|
||||
color: color
|
||||
});
|
||||
}
|
||||
|
@ -522,6 +525,8 @@
|
|||
function clear() {
|
||||
var i;
|
||||
|
||||
isVisible = false;
|
||||
|
||||
Overlays.editOverlay(boundingBoxOverlay, { visible: false });
|
||||
for (i = 0; i < NUM_CORNER_HANDLES; i += 1) {
|
||||
Overlays.editOverlay(cornerHandleOverlays[i], { visible: false });
|
||||
|
|
Loading…
Reference in a new issue