@hayro_o7/labyrinth 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
startNode?: string;
|
|
14
14
|
endNode?: string;
|
|
15
15
|
autoPlay?: boolean;
|
|
16
|
+
buttons?: boolean;
|
|
16
17
|
legend?: boolean;
|
|
17
18
|
stepCount?: boolean;
|
|
18
19
|
animationSpeed?: number;
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
startNode = '0,0',
|
|
30
31
|
endNode,
|
|
31
32
|
autoPlay = false,
|
|
33
|
+
buttons = true,
|
|
32
34
|
legend = true,
|
|
33
35
|
stepCount = true,
|
|
34
36
|
animationSpeed = 50,
|
|
@@ -267,11 +269,13 @@
|
|
|
267
269
|
</svg>
|
|
268
270
|
|
|
269
271
|
<div class="controls">
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
{#if buttons}
|
|
273
|
+
<button onclick={play} disabled={isPlaying}>Play</button>
|
|
274
|
+
<button onclick={pause} disabled={!isPlaying}>Pause</button>
|
|
275
|
+
<button onclick={reset}>Reset</button>
|
|
276
|
+
<button onclick={stepBackward} disabled={isPlaying || currentStepIndex === 0}>Step Back</button>
|
|
277
|
+
<button onclick={stepForward} disabled={isPlaying || currentStepIndex === steps.length}>Step Forward</button>
|
|
278
|
+
{/if}
|
|
275
279
|
{#if stepCount}
|
|
276
280
|
<span class="step-counter">
|
|
277
281
|
Step: {currentStepIndex} / {steps.length}
|