fix(street-level): four regressions from the merge review

- The selected sequence is drawn past the per-tile caps again, and its
  highlight takes every loaded part, drawn or not: in a dense tile a
  clicked Mapillary or Panoramax line kept its cones but lost its line.
- photoViewer tries :fullscreen and :popover-open one at a time, each in
  its own try: Safari before 16.4 parses neither, and the fallback threw
  on every flat KartaView or Panoramax photo.
- A lit Street View off Google 3D says it needs the Google 3D map again,
  instead of "every provider is switched off".
- Chips carry their provider colour again (--chip-color, as on main).

Each comes with the test that reproduced it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
German KhokhlovandClaude Opus 5.5 committed 2026-10-19 23:14:01 +04:00
1 parent 4e2e0d6900
commit fb777c1c93
9 files changed
+157 -17

No files matched your search

+17 -10
View File
@@ -6,11 +6,17 @@ import {
import { imageSize } from './imageSize.js';
import { msg, t } from '../../i18n/index.js';
/** A photo download (tens of kilobytes to a few megabytes). */
/** EXPAND puts the viewer's wrap full screen, or (iPhone) opens it as a popover. */
const EXPANDED_SELECTOR =
'.sl-viewer-wrap:fullscreen, .sl-viewer-wrap:popover-open';
/**
* EXPAND puts the viewer's wrap full screen, or (iPhone) opens it as a
* popover. Each is tried on its own: a browser that cannot parse one
* (Safari before 16.4) throws on the selector.
*/
const EXPANDED_SELECTORS = [
'.sl-viewer-wrap:fullscreen',
'.sl-viewer-wrap:popover-open',
];
/** A photo download (tens of kilobytes to a few megabytes). */
export const IMAGE_TIMEOUT_MS = 15_000;
/** A picture file or decoded side past these is refused (a photo is a few MB). */
@@ -745,12 +751,13 @@ export function createPhotoViewer({
/** The viewer is expanded (full screen, or the iPhone popover), not docked in the panel. */
function isExpanded() {
try {
return Boolean(root?.closest?.(EXPANDED_SELECTOR));
} catch {
// A browser without :popover-open has no popover EXPAND either.
return Boolean(root?.closest?.('.sl-viewer-wrap:fullscreen'));
}
return EXPANDED_SELECTORS.some((selector) => {
try {
return Boolean(root?.closest?.(selector));
} catch {
return false;
}
});
}
/** Another photo, or none: a sharper panorama still on its way is not needed. */