@fusion.dev/helix-map 0.172.0 → 0.174.0

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.
@@ -148,6 +148,8 @@ const viewportOf = (frame) => {
148
148
  return { height: box.height, width: box.width };
149
149
  };
150
150
  export const connectMap = (frame, driver, options = {}) => {
151
+ let live = true;
152
+ let starting = true;
151
153
  const handlePan = (event) => {
152
154
  const { by, to } = event.detail;
153
155
  const { height, width } = viewportOf(frame);
@@ -549,7 +551,7 @@ export const connectMap = (frame, driver, options = {}) => {
549
551
  layer.dispatchEvent(new HelixActivateEvent({ value }));
550
552
  }
551
553
  },
552
- settled: () => look(),
554
+ settled: () => (starting ? queueMicrotask(look) : look()),
553
555
  });
554
556
  const place = () => {
555
557
  if (!driver.project) {
@@ -765,7 +767,6 @@ export const connectMap = (frame, driver, options = {}) => {
765
767
  .finished.then(() => away(snapshot), () => away(snapshot));
766
768
  }
767
769
  });
768
- let live = true;
769
770
  let placing = false;
770
771
  let drawing = false;
771
772
  let queued = false;
@@ -909,6 +910,7 @@ export const connectMap = (frame, driver, options = {}) => {
909
910
  frame.addEventListener('keydown', handleFanKey);
910
911
  frame.addEventListener('pointerdown', handleFanDown);
911
912
  frame.addEventListener('click', handleFanPress);
913
+ starting = false;
912
914
  return {
913
915
  disconnect() {
914
916
  live = false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-map",
3
3
  "description": "Connects the Helix Map frame to a map renderer: MapLibre, Leaflet, or a driver of your own.",
4
- "version": "0.172.0",
4
+ "version": "0.174.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -43,14 +43,14 @@
43
43
  },
44
44
  "bugs": "https://github.com/project-fusion/fusion/issues",
45
45
  "dependencies": {
46
- "@fusion.dev/helix-core": "0.172.0",
47
- "@fusion.dev/helix-icons": "0.172.0",
46
+ "@fusion.dev/helix-core": "0.174.0",
47
+ "@fusion.dev/helix-icons": "0.174.0",
48
48
  "@mapbox/vector-tile": "^3.0.0",
49
49
  "pbf": "^5.1.2"
50
50
  },
51
51
  "devDependencies": {
52
- "@fusion.dev/helix-headless": "0.172.0",
53
- "@fusion.dev/helix-testing": "0.172.0",
52
+ "@fusion.dev/helix-headless": "0.174.0",
53
+ "@fusion.dev/helix-testing": "0.174.0",
54
54
  "@maplibre/maplibre-gl-style-spec": "^26.4.4",
55
55
  "@types/bun": "^1.4.2",
56
56
  "@types/leaflet": "^1.9.20",