tangled
alpha
login
or
join now
flo-bit.dev
/
blento
21
fork
atom
your personal website on atproto - mirror
blento.app
21
fork
atom
overview
issues
pulls
pipelines
pizza
Florian
1 month ago
c9467468
a0afbe3a
+4
-4
2 changed files
expand all
collapse all
unified
split
src
lib
cards
FluidTextCard
FluidTextCard.svelte
FluidTextCardSettings.svelte
+1
-1
src/lib/cards/FluidTextCard/FluidTextCard.svelte
···
19
19
const text = $derived((item.cardData?.text as string) || 'hello');
20
20
const fontWeight = '900';
21
21
const fontFamily = 'Arial';
22
22
-
const fontSize = $derived((item.cardData?.fontSize as number) || 0.13);
22
22
+
const fontSize = $derived(parseFloat(item.cardData?.fontSize) || 0.33);
23
23
24
24
// Draw text mask on overlay canvas
25
25
function drawOverlayCanvas() {
+3
-3
src/lib/cards/FluidTextCard/FluidTextCardSettings.svelte
···
10
10
item.cardData.fontSize = 0.33;
11
11
}
12
12
13
13
-
const displayPercent = $derived(Math.round((item.cardData.fontSize as number) * 100));
13
13
+
const displayPercent = $derived(Math.round((parseFloat(item.cardData.fontSize) as number) * 100));
14
14
</script>
15
15
16
16
<div class="flex flex-col gap-3">
···
26
26
min="0.1"
27
27
max="0.8"
28
28
step="0.01"
29
29
-
value={item.cardData.fontSize ?? 0.33}
29
29
+
value={parseFloat(item.cardData.fontSize) ?? 0.33}
30
30
oninput={(e) => {
31
31
-
item.cardData.fontSize = parseFloat(e.currentTarget.value);
31
31
+
item.cardData.fontSize = e.currentTarget.value.toString();
32
32
}}
33
33
class="bg-base-200 dark:bg-base-700 h-2 w-full cursor-pointer appearance-none rounded-lg"
34
34
/>