Skip to content

Commit a2c33d2

Browse files
authored
Fix scale to consider edge creation
1 parent 2896226 commit a2c33d2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dd26/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
ctx.fillStyle = BACKGROUND; // Set this to your desired background color
342342
ctx.fillRect(0, 0, canvas.width, canvas.height);
343343

344-
const maxDistance = 300; // Maximum distance to draw a line
344+
const maxDistance = 300 * getScale(); // Maximum distance to draw a line
345345
dotted = 0
346346
for (let i = 0; i < bubbles.length; i++) {
347347
for (let j = i + 1; j < bubbles.length; j++) {
@@ -373,7 +373,7 @@
373373

374374

375375
// Draw lines to the center from close bubbles
376-
const centerMaxDistance = 400; // Maximum distance from center to draw a line
376+
const centerMaxDistance = 400 * getScale(); // Maximum distance from center to draw a line
377377
const centerX = canvas.width / 2;
378378
const centerY = canvas.height / 2;
379379
dotted = 0

0 commit comments

Comments
 (0)