Fix casting zoom level from string to floatInt

Changed the type of the zoomLevel parameter from number to string and updated the assignment to parse the zoomLevel as a float. This ensures that the zoom functionality properly handles string inputs by converting them to numerical values.
This commit is contained in:
Julien Fastré 2024-11-06 19:31:01 +01:00
parent 76458cf375
commit 5447ad2961
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB

View File

@ -331,8 +331,8 @@ const $toast = useToast();
const signature = window.signature; const signature = window.signature;
const setZoomLevel = (zoomLevel: number) => { const setZoomLevel = (zoomLevel: string) => {
zoom.value = zoomLevel; zoom.value = Number.parseFloat(zoomLevel);
setPage(page.value); setPage(page.value);
setTimeout(() => drawAllZones(page.value), 200); setTimeout(() => drawAllZones(page.value), 200);
}; };