feat: update some more components to svelte 5
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m48s

This commit is contained in:
Max Richter
2025-11-24 21:11:16 +01:00
parent d64877666b
commit cfcb447784
17 changed files with 130 additions and 80 deletions

View File

@@ -8,7 +8,7 @@
index = getContext<() => number>("registerCell")();
}
const sizes = getContext<string[]>("sizes");
const sizes = getContext<{ value: string[] }>("sizes");
let downSizes: string[] = [];
let downWidth = 0;
@@ -16,7 +16,7 @@
let startX = 0;
function handleMouseDown(event: MouseEvent) {
downSizes = [...sizes];
downSizes = [...sizes.value];
mouseDown = true;
startX = event.clientX;
downWidth = wrapper.getBoundingClientRect().width;
@@ -25,7 +25,7 @@
function handleMouseMove(event: MouseEvent) {
if (mouseDown) {
const width = downWidth + startX - event.clientX;
sizes[index] = `${width}px`;
sizes.value[index] = `${width}px`;
}
}
</script>