termites 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server.js +9 -0
package/package.json
CHANGED
package/server.js
CHANGED
|
@@ -1236,6 +1236,15 @@ class TermitesServer {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
// Initial adjustment
|
|
1238
1238
|
handleViewportResize();
|
|
1239
|
+
// Resize when window gains focus (switching from mobile to desktop)
|
|
1240
|
+
window.addEventListener('focus', () => {
|
|
1241
|
+
setTimeout(handleViewportResize, 100);
|
|
1242
|
+
});
|
|
1243
|
+
document.addEventListener('visibilitychange', () => {
|
|
1244
|
+
if (!document.hidden) {
|
|
1245
|
+
setTimeout(handleViewportResize, 100);
|
|
1246
|
+
}
|
|
1247
|
+
});
|
|
1239
1248
|
connect();
|
|
1240
1249
|
applyTheme(currentTheme);
|
|
1241
1250
|
}
|