Disable point movement in v6 biome mode

This commit is contained in:
Wuzzy 2023-10-27 18:37:39 +02:00
parent 6470fe250d
commit 1079a13836

View File

@ -1445,7 +1445,7 @@ let dragDropState = 0;
/* Move and update the biome point while the user /* Move and update the biome point while the user
is dragging it */ is dragging it */
function updatePointWhenDragged(pointID) { function updatePointWhenDragged(pointID) {
if (pointID !== null && !drawError) { if (pointID !== null && !drawError && biomeMode === "modern") {
let selectedPoint = null; let selectedPoint = null;
let points = getRenderedPoints(getViewY()); let points = getRenderedPoints(getViewY());
for (let i=0; i<points.length; i++) { for (let i=0; i<points.length; i++) {
@ -1539,7 +1539,7 @@ function updateCanvasCursorStatus(x, y) {
return return
} }
if (drawError || !showPoints) { if (drawError || !showPoints || biomeMode === "v6") {
// a special message is shown; use auto cursor // a special message is shown; use auto cursor
voronoiCanvas.style.cursor = "auto"; voronoiCanvas.style.cursor = "auto";
return return
@ -1733,7 +1733,7 @@ voronoiCanvas.onmousedown = function(event) {
return; return;
} }
if (drawError || !showPoints) { if (drawError || !showPoints || biomeMode === "v6") {
// Points need to be shown for drag-n-drop to work // Points need to be shown for drag-n-drop to work
return; return;
} }
@ -1754,7 +1754,7 @@ voronoiCanvas.onmousedown = function(event) {
} }
voronoiCanvas.ondblclick = function(event) { voronoiCanvas.ondblclick = function(event) {
// Add a biome at double-click position, if possible // Add a biome at double-click position, if possible
if (drawError || dragDropState !== 0) { if (drawError || dragDropState !== 0 || biomeMode === "v6") {
return; return;
} }
// No-op if in selection range // No-op if in selection range