mirror of
https://github.com/nekename/OpenDeck.git
synced 2026-10-28 09:44:01 +00:00
fix: limit redraws to rotation setting changes to stop key canvas flickering
This commit is contained in:
1 file changed
+7
-5
@@ -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>
|
||||
|
||||
|
||||
Reference in new issue
Block a user