redraw on entering/leaving enhanced close #198

This commit is contained in:
Matt Walsh
2026-04-08 09:24:54 -05:00
parent eee4519095
commit ec1169e07b
2 changed files with 6 additions and 1 deletions

View File

@@ -37,6 +37,11 @@ const init = async () => {
resizeTimeout = setTimeout(() => resize(), 100);
});
// redraw current screen (typically from enhanced setting change)
window.addEventListener('redraw', () => {
currentDisplay()?.drawCanvas();
});
// Handle orientation changes (Mobile Safari doesn't always fire resize events on orientation change)
window.addEventListener('orientationchange', () => {
if (debugFlag('resize')) {

View File

@@ -48,7 +48,7 @@ const enhancedScreenChange = (value) => {
container.classList.remove('enhanced');
}
// Trigger resize to recalculate scaling for new width
window.dispatchEvent(new Event('resize'));
window.dispatchEvent(new Event('redraw'));
};
const kioskChange = (value) => {