diff --git a/src/lib/components/AlertBoard.svelte b/src/lib/components/AlertBoard.svelte index daf7cee..1e976b7 100644 --- a/src/lib/components/AlertBoard.svelte +++ b/src/lib/components/AlertBoard.svelte @@ -13,8 +13,10 @@
-
{alert.title}
-
{alert.message}
+
+ {alert.title} +
+
{alert.message}
diff --git a/src/lib/components/Preference/PreferenceDialog.svelte b/src/lib/components/Preference/PreferenceDialog.svelte index 2a4b00d..dfa064a 100644 --- a/src/lib/components/Preference/PreferenceDialog.svelte +++ b/src/lib/components/Preference/PreferenceDialog.svelte @@ -10,16 +10,12 @@ const dispatch = createEventDispatcher<{ centerBoard: void; - scaleUpdate: number; }>();
- dispatch('centerBoard')} - on:scaleUpdate={(event) => (boardScale = event.detail)} - /> + dispatch('centerBoard')} />
diff --git a/src/lib/components/Preference/ScaleControl.svelte b/src/lib/components/Preference/ScaleControl.svelte index 1bb96fa..3ac6631 100644 --- a/src/lib/components/Preference/ScaleControl.svelte +++ b/src/lib/components/Preference/ScaleControl.svelte @@ -3,27 +3,17 @@ import { createEventDispatcher } from 'svelte'; const dispatch = createEventDispatcher<{ scaleUpdate: number; centerBoard: void }>(); - - let scale = 5; - const scaleMap: Record = { - 1: 0.5, - 2: 0.6, - 3: 0.75, - 4: 0.9, - 5: 1, - 6: 1.1, - 7: 1.2, - 8: 1.3, - 9: 1.5 - }; - - $: scale && dispatch('scaleUpdate', scaleMap[scale]); + export let scale: number;

Board Scale

- {scale} - + + +
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index c925d61..b4c8a3e 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,5 +1,6 @@ @@ -40,13 +42,14 @@ - +
- + +