diff options
author | Andinus <andinus@nand.sh> | 2021-10-10 19:35:59 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-10-10 19:35:59 +0530 |
commit | 1b8ea9912913b11bb34d283ba492fe40eaced3d6 (patch) | |
tree | 18a986cbbd2782f336ce62369acfbe1a28f4face | |
parent | 484ae4f0ebc878542c9101823645e7b1f5c7da28 (diff) | |
download | dorado-1b8ea9912913b11bb34d283ba492fe40eaced3d6.tar.gz |
Plot graph when plotly is ready
-rw-r--r-- | src/algorithms/line-drawing/DDA.svelte | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/algorithms/line-drawing/DDA.svelte b/src/algorithms/line-drawing/DDA.svelte index bee2c16..b759cdc 100644 --- a/src/algorithms/line-drawing/DDA.svelte +++ b/src/algorithms/line-drawing/DDA.svelte @@ -5,7 +5,10 @@ let solved = false; let plotlyReady = false; - const plotlyLoaded = () => plotlyReady = true; + const plotlyLoaded = () => { + plotlyReady = true; + dda(); + } let x0 = 0, y0 = 0, x1 = 4, y1 = 4; let dx, dy; @@ -121,7 +124,7 @@ <h3>Graph</h3> {#if plotlyReady === false} - {alert("Cannot plot graph: Plotly is not ready. Try again.")} + <p class="note"> Cannot plot graph: Plotly is not ready. </p> |