fix: limit redraws to rotation setting changes to stop key canvas flickering

This commit is contained in:
nekename committed 2026-02-27 22:17:26 +00:00
1 parent 783403e535
commit f7b081ab91
1 file changed
+7 -5
+7 -5
View File
@@ -122,11 +122,13 @@
}
}
})();
$: {
if ($settings?.rotation != undefined) {
canvas?.getContext("2d")?.clearRect(0, 0, canvas.width, canvas.height);
slot = slot;
}
function clearAndRedraw() {
canvas?.getContext("2d")?.clearRect(0, 0, canvas.width, canvas.height);
slot = slot;
}
$: if ($settings?.rotation != undefined) {
clearAndRedraw();
}
</script>