Skip to content

Commit b7c92cc

Browse files
authored
Update index.html
1 parent f00ad77 commit b7c92cc

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

index.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,18 +1167,7 @@ <h3>Import Options</h3>
11671167
const mouseX= e.clientX - rect.left;
11681168
const mouseY= e.clientY - rect.top;
11691169

1170-
// Circle creation or circle dragging
1171-
if (dragMode) {
1172-
for (let i = 0; i < circles.length; i++) {
1173-
const c = circles[i];
1174-
const dx = mouseX - c.x, dy = mouseY - c.y;
1175-
if (Math.hypot(dx, dy) < c.radius + 5) {
1176-
draggingCircleIndex = i;
1177-
return;
1178-
}
1179-
}
1180-
// no return here — fall through to other modes
1181-
}
1170+
11821171

11831172
// 2) Only start a new circle if drawMode==='circle' AND dragMode is OFF
11841173
if (drawMode === 'circle' && !anyEditModeOn()) {
@@ -1365,6 +1354,19 @@ <h3>Import Options</h3>
13651354
}
13661355
}
13671356

1357+
// Circle creation or circle dragging
1358+
if (dragMode) {
1359+
for (let i = 0; i < circles.length; i++) {
1360+
const c = circles[i];
1361+
const dx = mouseX - c.x, dy = mouseY - c.y;
1362+
if (Math.hypot(dx, dy) < c.radius + 5) {
1363+
draggingCircleIndex = i;
1364+
return;
1365+
}
1366+
}
1367+
// no return here — fall through to other modes
1368+
}
1369+
13681370
// Otherwise, if in blob or line mode, start freehand
13691371
if ((drawMode === 'blob' || drawMode === 'line') && !anyEditModeOn()) {
13701372
isDrawing = true;

0 commit comments

Comments
 (0)