fix button state on handler reset
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmL5tZcACgkQO3+8IhRO Y5ilew/+MNO/P5CBiRptkAQqp9I/9vCknl3jhgy6UGEmXVCtT2ytd8+0zGiT9+L8 +VkHS9M25/Ya3rHk49pWhbjkbeS6bKcco+1TmRWq+H9/iuHRTVMi5hWWHVO/KJ18 tMuxzJ1v0H6y7tCebuHhjVwWa+yXg7f81c7NIPHaZi4j7km/gfqtWRw1u0YT/vMQ 4g4D4jZdwn02V7l5SxqKrsHb4xXyDLBY3TZcs8jd/qWINIE5WBb+MtrRI6+OGz92 vs6tDWa6GW8fB6s8ZIhYXVxySedTSmUOQy/iP0X7rAGnZ/ZmhWrs4F6rGiYRqkjy alWKKSdkwByQb6zfBDs6Zp4FFJYTYGiqkjm/Lmn2EOTT9AK6+BRQkDx/f9k55/G9 wD0597Tzjq7MPBzIr5/cYHIEOUdmlTrg80/QMe371Dhmw7MbK1GgUbcQ/kQrbj/W 70VLGdcSdlzaAUOaNZM0AkE7wtKh1zAdSpsXl/MzNumWiPgO4SgZdsosCqE555aU 2iGrhmbNZBPhWfgyInyy1tDj/bgk8cs9oeL9fzRu3aZce0bNXdEm75WV9Na1wmlv 1zGqUkj/36N6AWvLgO/bSlhdfToDUZ5xutfKWeMTimucyKGczZ6o9k3gr67EQ+df v8R+23NWzt6BeHakx36usIipvxCdBeZOxLwJQu6+oJh195lcMI8= =Gl4I -----END PGP SIGNATURE-----
3 files changed,
51 insertions(+),
0 deletions(-)
M
src/40-handlers.ts
→
src/40-handlers.ts
@@ -50,6 +50,24 @@ addPolygonBtn.classList.remove("activeBtn");
} self.map.off("click", MapHandler.polygonAddPoint); } catch {} + try { + const saveBtn = document.getElementById("save-btn"); + if (saveBtn) { + saveBtn.classList.remove("activeBtn"); + } + } catch {} + try { + const clearBtn = document.getElementById("clear-btn"); + if (clearBtn) { + clearBtn.classList.remove("activeBtn"); + } + } catch {} + try { + const menuBtn = document.getElementById("menu-btn"); + if (menuBtn) { + menuBtn.classList.remove("activeBtn"); + } + } catch {} } }@@ -198,6 +216,7 @@ if (okBtn) {
okBtn.onclick = ()=> { OverlayState.save(self.overlays); self.modals.okCancel.setVisible(false); + MapHandler.resetMapClick(); // show info modal "Save complete" } }@@ -205,6 +224,7 @@ const cancelBtn = self.modals.okCancel.cancelBtn();
if (cancelBtn) { cancelBtn.onclick = () => { self.modals.okCancel.setVisible(false); + MapHandler.resetMapClick(); } } self.modals.okCancel.setVisible(true);@@ -223,12 +243,14 @@ const okBtn = self.modals.okCancel.okBtn();
if (okBtn) { okBtn.onclick = ()=> { self.overlays = OverlayState.clear(self.overlays, self.map); + MapHandler.resetMapClick(); self.modals.okCancel.setVisible(false); } } const cancelBtn = self.modals.okCancel.cancelBtn(); if (cancelBtn) { cancelBtn.onclick = () => { + MapHandler.resetMapClick(); self.modals.okCancel.setVisible(false); } }
M
static/onyx-scry.js
→
static/onyx-scry.js
@@ -163,11 +163,13 @@ }
TileLayerWrapper.layers = new Array(); class TextUtils { static decodeHTML(text) { + return text; const textArea = document.createElement('textarea'); textArea.innerHTML = text; return textArea.value; } static encodeHTML(text) { + return text; const textArea = document.createElement('textarea'); textArea.innerText = text; return textArea.innerHTML;@@ -414,6 +416,27 @@ }
self.map.off("click", MapHandler.polygonAddPoint); } catch (_c) { } + try { + const saveBtn = document.getElementById("save-btn"); + if (saveBtn) { + saveBtn.classList.remove("activeBtn"); + } + } + catch (_d) { } + try { + const clearBtn = document.getElementById("clear-btn"); + if (clearBtn) { + clearBtn.classList.remove("activeBtn"); + } + } + catch (_e) { } + try { + const menuBtn = document.getElementById("menu-btn"); + if (menuBtn) { + menuBtn.classList.remove("activeBtn"); + } + } + catch (_f) { } } } static addMarker(e) {@@ -547,6 +570,7 @@ if (okBtn) {
okBtn.onclick = () => { OverlayState.save(self.overlays); self.modals.okCancel.setVisible(false); + MapHandler.resetMapClick(); // show info modal "Save complete" }; }@@ -554,6 +578,7 @@ const cancelBtn = self.modals.okCancel.cancelBtn();
if (cancelBtn) { cancelBtn.onclick = () => { self.modals.okCancel.setVisible(false); + MapHandler.resetMapClick(); }; } self.modals.okCancel.setVisible(true);@@ -570,12 +595,14 @@ const okBtn = self.modals.okCancel.okBtn();
if (okBtn) { okBtn.onclick = () => { self.overlays = OverlayState.clear(self.overlays, self.map); + MapHandler.resetMapClick(); self.modals.okCancel.setVisible(false); }; } const cancelBtn = self.modals.okCancel.cancelBtn(); if (cancelBtn) { cancelBtn.onclick = () => { + MapHandler.resetMapClick(); self.modals.okCancel.setVisible(false); }; }
M
static/style.css
→
static/style.css
@@ -222,6 +222,8 @@ background: black;
z-index: 10; color: white; padding: 0.5em; + width: 100%; + max-width: fit-content; } #import-export-container {