Lazily create and toggle Cesium globe visibility

The globe container now uses a `visible` class instead of
`display`, allowing the Cesium viewer to be pre-created on page
load while remaining hidden until the geographic view is selected.
This commit is contained in:
2026-09-19 01:12:45 +08:00
parent 71750e5dad
commit 58bc998c6e
3 changed files with 30 additions and 2 deletions
+2 -1
View File
@@ -28,8 +28,9 @@ html, body {
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#cesium-container {
position: absolute; inset: 0; width: 100%; height: 100%;
display: none; background: #14100d;
visibility: hidden; background: #14100d;
}
#cesium-container.visible { visibility: visible; }
#cesium-container .cesium-viewer,
#cesium-container .cesium-widget,
#cesium-container canvas { width: 100%; height: 100%; }