This commit is contained in:
33333-33333 2026-07-18 13:06:02 +09:00
commit f657b6a4a4
94 changed files with 3970 additions and 1241 deletions

View file

@ -533,6 +533,7 @@
function beginPan(clientX, clientY, button = null) {
uiCache.panning = true;
if (button === 2) uiCache.suppressContextMenuUntil = 0;
uiCache.panMoved = false;
uiCache.panButton = button;
uiCache.panStartX = clientX;
@ -560,8 +561,11 @@
function endPan(button = null) {
if (!uiCache.panning) return false;
if (uiCache.panButton !== null && button !== null && button !== uiCache.panButton) return false;
const endedButton = uiCache.panButton;
const moved = Boolean(uiCache.panMoved);
uiCache.panning = false;
uiCache.panButton = null;
if (endedButton === 2 && moved) uiCache.suppressContextMenuUntil = (performance?.now?.() ?? Date.now()) + 650;
canvas.style.cursor = cursorForTool(world.tool);
return true;
}