about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-10-10 19:35:59 +0530
committerAndinus <andinus@nand.sh>2021-10-10 19:35:59 +0530
commit1b8ea9912913b11bb34d283ba492fe40eaced3d6 (patch)
tree18a986cbbd2782f336ce62369acfbe1a28f4face /src
parent484ae4f0ebc878542c9101823645e7b1f5c7da28 (diff)
downloaddorado-1b8ea9912913b11bb34d283ba492fe40eaced3d6.tar.gz
Plot graph when plotly is ready
Diffstat (limited to 'src')
-rw-r--r--src/algorithms/line-drawing/DDA.svelte7
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>