@sjvair/map-sdk 0.1.0-beta.8 → 0.1.0-beta.9
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/README.md +7 -0
- package/dist/ui/MapTooltip.svelte +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -564,6 +564,13 @@ local sjvair.com stack at `http://localhost:8000`.
|
|
|
564
564
|
|
|
565
565
|
## Changes
|
|
566
566
|
|
|
567
|
+
### 0.1.0-beta.9
|
|
568
|
+
|
|
569
|
+
- **A map with `tooltip="pointer"` comes back after releasing WebGL.** Setting `MapView`'s
|
|
570
|
+
`active` to `false` threw "Cannot read properties of null (reading 'off')" from the tooltip's
|
|
571
|
+
zoom listener, and the map never drew again until a reload. It now releases and rebuilds cleanly.
|
|
572
|
+
In 0.1.0-beta.7 and 0.1.0-beta.8; maps with the default `tooltip="pinned"` weren't affected.
|
|
573
|
+
|
|
567
574
|
### 0.1.0-beta.8
|
|
568
575
|
|
|
569
576
|
- **The pinned reading card.** `MapView`'s new `card` prop: a click or tap on a feature pins its
|
|
@@ -40,10 +40,12 @@
|
|
|
40
40
|
// Pointer mode only: set by a zoom, cleared by the next pointer move over a hit.
|
|
41
41
|
let zoomHidden = $state(false);
|
|
42
42
|
$effect(() => {
|
|
43
|
-
|
|
43
|
+
// Captured: props are live, and the cleanup runs after MapView has set `gl` to null.
|
|
44
|
+
const g = gl;
|
|
45
|
+
if (mode !== "pointer" || !g) return;
|
|
44
46
|
const onZoomStart = () => (zoomHidden = true);
|
|
45
|
-
|
|
46
|
-
return () =>
|
|
47
|
+
g.on("zoomstart", onZoomStart);
|
|
48
|
+
return () => g.off("zoomstart", onZoomStart);
|
|
47
49
|
});
|
|
48
50
|
$effect(() => {
|
|
49
51
|
// A new hovered object comes with every pointer move over a hit.
|