mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(street-level): re-check an unknown key, Esc leaves full screen, say why a view is empty
- A failed or missing key status is asked again on the next switch-on, and the check gives up after 10 s instead of holding LOADING forever. - Waiting for the key status reads as LOADING while the layer is on. - Esc shrinks the photo in full screen too, before the panel's own Esc. - Destroying the panel with the iPhone popover open leaves no popover behind. - An empty view says whether the filter emptied it. - A freed upstream tile slot passes straight to the oldest waiter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
d313b6e62c
commit
8e5e3cdd3b
10 files changed
+201
-30
No files matched your search
@@ -118,18 +118,18 @@ export class StreetLevelControls {
|
||||
this.listen(el.viewerExpand, 'click', () => this._toggleExpanded());
|
||||
if (this._expandMode === 'fullscreen')
|
||||
this.listen(document, 'fullscreenchange', () => this._syncExpanded());
|
||||
else {
|
||||
else
|
||||
this.listen(el.viewerWrap, 'toggle', (event) =>
|
||||
this._onPopoverToggle(event),
|
||||
);
|
||||
// Esc shrinks the photo before the panel's own Esc can collapse it.
|
||||
this.listen(el.viewerWrap, 'keydown', (event) => {
|
||||
if (event.key !== 'Escape' || !this.isViewerExpanded()) return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this._exitExpanded();
|
||||
});
|
||||
}
|
||||
// Esc shrinks the photo before the panel's own Esc can collapse it, in
|
||||
// a browser that hands the key to the page while full screen too.
|
||||
this.listen(el.viewerWrap, 'keydown', (event) => {
|
||||
if (event.key !== 'Escape' || !this.isViewerExpanded()) return;
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this._exitExpanded();
|
||||
});
|
||||
} else setProp(el.viewerExpand, 'hidden', true);
|
||||
for (const button of el.renderButtons) {
|
||||
this.listen(button, 'click', () => {
|
||||
@@ -430,6 +430,10 @@ export class StreetLevelControls {
|
||||
if (this.destroyed) return;
|
||||
this.destroyed = true;
|
||||
this._exitExpanded();
|
||||
// Its `toggle` is not heard once destroyed: a popover left on the wrap
|
||||
// would hide the viewer even inside the panel.
|
||||
if (this._expandMode === 'popover')
|
||||
this._elements.viewerWrap?.removeAttribute('popover');
|
||||
this._watchPanelHidingModes(false);
|
||||
this.listeners.abort();
|
||||
this._resizeObserver?.disconnect();
|
||||
|
||||
Reference in new issue
Block a user