ui/fix: frozen map after clicking machine
This commit is contained in:
@@ -582,18 +582,15 @@ export function CubeScene(props: {
|
|||||||
};
|
};
|
||||||
const handleMouseUp = (e: MouseEvent) => {
|
const handleMouseUp = (e: MouseEvent) => {
|
||||||
if (e.button === 0) {
|
if (e.button === 0) {
|
||||||
console.log("Left mouse up");
|
|
||||||
setIsDragging(false);
|
setIsDragging(false);
|
||||||
if (cancelMove()) {
|
if (cancelMove()) {
|
||||||
clearTimeout(cancelMove()!);
|
clearTimeout(cancelMove()!);
|
||||||
setCancelMove(undefined);
|
setCancelMove(undefined);
|
||||||
}
|
}
|
||||||
|
// Always re-enable controls
|
||||||
|
controls.enabled = true;
|
||||||
|
|
||||||
if (worldMode() === "move") {
|
if (worldMode() === "move") {
|
||||||
// Cancel long-press if it wasn't triggered yet
|
|
||||||
// Re-enable controls
|
|
||||||
controls.enabled = true;
|
|
||||||
|
|
||||||
// Set machine as not flying
|
// Set machine as not flying
|
||||||
props.setMachinePos(
|
props.setMachinePos(
|
||||||
highlightGroups["move"].values().next().value!,
|
highlightGroups["move"].values().next().value!,
|
||||||
|
|||||||
Reference in New Issue
Block a user