diff --git a/index.html b/index.html index 507ff63..6c08d83 100644 --- a/index.html +++ b/index.html @@ -118,8 +118,13 @@

Grada

height="20" /> -
-
+
+
@@ -185,7 +190,7 @@

Grada

-
+
Grada - + diff --git a/js/Draw/Minors/Viewers/GraphViewer.js b/js/Draw/Minors/Viewers/GraphViewer.js index 9d7fd12..5a697a2 100644 --- a/js/Draw/Minors/Viewers/GraphViewer.js +++ b/js/Draw/Minors/Viewers/GraphViewer.js @@ -3,7 +3,7 @@ class GraphViewer extends Viewer { super(x, y, 500, 300); this.dot = new GraphDot(this, true); this.dark = true; - this.scale = 1; + this.scale = this.data.length > 2000 ? 1 : 0.1; this.gridRows = 20; this.gridCols = 10; this.buttons = []; diff --git a/js/Managers/canvasManager.js b/js/Managers/canvasManager.js index fbbd577..154c7e8 100644 --- a/js/Managers/canvasManager.js +++ b/js/Managers/canvasManager.js @@ -7,7 +7,6 @@ let TWO_PI; let MOVE; let WAIT; let HAND; -let FRAMECOUNT; let atan2; let dist; @@ -45,7 +44,6 @@ class CanvasManager { MOVE = p.MOVE; WAIT = p.WAIT; HAND = p.HAND; - FRAMECOUNT = p.frameCount; atan2 = (y, x) => p.atan2(y, x); dist = (x1, y1, x2, y2) => p.dist(x1, y1, x2, y2); diff --git a/js/canvas.js b/js/canvas.js index f7dec43..0842095 100644 --- a/js/canvas.js +++ b/js/canvas.js @@ -36,11 +36,11 @@ let mainSketch = function (p) { }; p.mousePressed = function () { - !editLayerOrganizer.isEnabled() && iManager.handlePress(); + !mainOrganizer.isDisabled() && iManager.handlePress(); }; p.mouseDragged = function () { - !editLayerOrganizer.isEnabled() && iManager.handleDrag(); + !mainOrganizer.isDisabled() && iManager.handleDrag(); }; p.mouseReleased = function () { diff --git a/js/script.js b/js/script.js index 79fcd91..26528d2 100644 --- a/js/script.js +++ b/js/script.js @@ -111,3 +111,9 @@ function scaleCanvas(event) { iManager.scaleFactor = newScaleFactor; } + +const children = getElementById("disable-background").children; + +for (let child of children) { + child.addEventListener("click", (e) => e.stopPropagation()); +}