@abi-software/flatmap-viewer 4.2.13 → 4.3.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.
package/README.md CHANGED
@@ -4,7 +4,7 @@ A web-browser viewer for anatomical flatmaps generated by [flatmap-maker](https:
4
4
 
5
5
  ## Package Installation
6
6
 
7
- * `pnpm install @abi-software/flatmap-viewer@4.2.13`
7
+ * `pnpm install @abi-software/flatmap-viewer@4.3.0`
8
8
 
9
9
  ---
10
10
 
package/dist/index.js CHANGED
@@ -93608,7 +93608,7 @@ class L_t {
93608
93608
  const i = t[n];
93609
93609
  i && (Array.isArray(i) && i.length || i.constructor === Object && Object.keys(i).length ? e[n] = i : n === "featureId" ? e[n] = +i : b_t.includes(n) ? e[n] = JSON.parse(`${i}`) : e[n] = i);
93610
93610
  }
93611
- return Object.keys(e).length > 0 && (e.type = "feature"), e;
93611
+ return "models" in e && (e.id = e.models), Object.keys(e).length > 0 && (e.type = "feature"), e;
93612
93612
  }
93613
93613
  /**
93614
93614
  * Show or hide a tool for drawing regions to annotate on the map.
@@ -94063,7 +94063,12 @@ Lu = new WeakMap(), wu = new WeakMap(), Au = new WeakMap(), z2 = new WeakMap(),
94063
94063
  const o = M(this, y5).get(n);
94064
94064
  Array.isArray(i) ? M(this, y5).set(n, o.union(new os(i.map((s) => `${s}`)))) : o.add(`${i}`);
94065
94065
  }
94066
- M(this, Lu).set(e.id, t), this.options.style === ui.CENTRELINE && e.centreline && (e.lineString = AR(e.coordinates), e.lineLength = Let(e.lineString));
94066
+ if (M(this, Lu).set(e.id, t), this.options.style === ui.CENTRELINE && e.centreline)
94067
+ try {
94068
+ e.lineString = AR(e.coordinates), e.lineLength = Let(e.lineString);
94069
+ } catch {
94070
+ console.log(`Bad centreline for ${e.id}, ${e.models}, coordinates: ${e.coordinates}`);
94071
+ }
94067
94072
  }, nA = async function(t) {
94068
94073
  if (t && !M(this, Sl).has(t)) {
94069
94074
  const e = await this.queryLabels(t);
@@ -94071,7 +94076,7 @@ Lu = new WeakMap(), wu = new WeakMap(), Au = new WeakMap(), z2 = new WeakMap(),
94071
94076
  return M(this, Sl).set(t, e[0].label);
94072
94077
  }
94073
94078
  };
94074
- const w_t = "4.2.13", A_t = 1.4;
94079
+ const w_t = "4.3.0", A_t = 1.4;
94075
94080
  var Jm, td, Cl, J1, ed, rd, I3, iA, oA, T$;
94076
94081
  class M_t {
94077
94082
  // also have a callback for viewer events...
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/flatmap-viewer",
3
- "version": "4.2.13",
3
+ "version": "4.3.0",
4
4
  "description": "Flatmap viewer using Maplibre GL",
5
5
  "repository": {
6
6
  "type": "git",