Always show "tap zone layout" preview when necessary

In case the "tap zone layout" setting value got changed from or to the same value as the default value, the preview was never shown due to the canvas being reused and therefore not triggering the useEffect
This commit is contained in:
schroda
2024-12-30 16:32:30 +01:00
parent 6ca6864035
commit 6a32395234

View File

@@ -52,7 +52,7 @@ const BaseTapZoneLayout = ({
useLayoutEffect(() => {
const canvasContainerElement = document.getElementById(CANVAS_ID);
canvasContainerElement?.replaceChildren(canvas);
}, [canvas]);
}, [canvas, showPreview]);
return (
<Box