@abi-software/flatmap-viewer 4.2.5 → 4.2.6

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +19 -19
  3. package/package.json +1 -1
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.5`
7
+ * `pnpm install @abi-software/flatmap-viewer@4.2.6`
8
8
 
9
9
  ---
10
10
 
package/dist/index.js CHANGED
@@ -28955,11 +28955,12 @@ class jit extends P2 {
28955
28955
  ];
28956
28956
  }
28957
28957
  paintStyle(t, e = !1) {
28958
- const n = !("coloured" in t) || t.coloured, i = t.dimmed || !1, o = t.flatmapStyle === yi.FUNCTIONAL, s = {
28958
+ const n = !("coloured" in t) || t.coloured, i = !("outlined" in t) || t.outlined, o = t.dimmed || !1, s = t.flatmapStyle === yi.FUNCTIONAL, u = {
28959
28959
  "fill-color": [
28960
28960
  "case",
28961
28961
  ["boolean", ["feature-state", "selected"], !1],
28962
- o ? "#CCC" : Du,
28962
+ s ? "#CCC" : Du,
28963
+ ...i ? [] : [["boolean", ["feature-state", "active"], !1], "#444"],
28963
28964
  ["boolean", ["feature-state", "hidden"], !1],
28964
28965
  Qg,
28965
28966
  ["has", "colour"],
@@ -28971,9 +28972,8 @@ class jit extends P2 {
28971
28972
  ["==", ["case", ["has", "shape-type"], ["get", "shape-type"], "component"], "component"],
28972
28973
  ["boolean", ["feature-state", "active"], !1]
28973
28974
  ],
28974
- n && !o ? "#D88" : "#DDD",
28975
- "white"
28976
- // background colour? body colour ??
28975
+ n && !s ? "#D88" : "#DDD",
28976
+ n ? "white" : "#CCC"
28977
28977
  ],
28978
28978
  "fill-opacity": [
28979
28979
  "case",
@@ -28992,11 +28992,11 @@ class jit extends P2 {
28992
28992
  ["==", ["case", ["has", "shape-type"], ["get", "shape-type"], "component"], "component"],
28993
28993
  ["boolean", ["feature-state", "active"], !1]
28994
28994
  ],
28995
- o ? 0.1 : 0.7,
28996
- n && !i ? 0.01 : 0.1
28995
+ s ? 0.1 : 0.7,
28996
+ n ? o ? 0.1 : 0.01 : 0.4
28997
28997
  ]
28998
28998
  };
28999
- return super.changedPaintStyle(s, e);
28999
+ return super.changedPaintStyle(u, e);
29000
29000
  }
29001
29001
  style(t, e) {
29002
29002
  return {
@@ -29022,13 +29022,13 @@ class zit extends P2 {
29022
29022
  ];
29023
29023
  }
29024
29024
  paintStyle(t, e = !1) {
29025
- const n = !("coloured" in t) || t.coloured, i = !("outlined" in t) || t.outlined, o = t.dimmed || !1, s = t.activeRasterLayer || !1, a = t.flatmapStyle === yi.FUNCTIONAL, u = ["case"];
29026
- u.push(["boolean", ["feature-state", "hidden"], !1], Qg), u.push(["boolean", ["feature-state", "selected"], !1], a ? "#F80" : kit), n && i && u.push(["boolean", ["feature-state", "active"], !1], MB), u.push(["boolean", ["feature-state", "annotated"], !1], EB), u.push(["has", "stroke"], ["get", "stroke"]), u.push(["has", "colour"], ["get", "colour"]), u.push("#444");
29025
+ const n = !("outlined" in t) || t.outlined, i = t.dimmed || !1, o = t.activeRasterLayer || !1, s = t.flatmapStyle === yi.FUNCTIONAL, a = ["case"];
29026
+ a.push(["boolean", ["feature-state", "hidden"], !1], Qg), a.push(["boolean", ["feature-state", "selected"], !1], s ? "#F80" : kit), n && a.push(["boolean", ["feature-state", "active"], !1], MB), a.push(["boolean", ["feature-state", "annotated"], !1], EB), a.push(["has", "stroke"], ["get", "stroke"]), a.push(["has", "colour"], ["get", "colour"]), a.push("#444");
29027
+ const u = ["case"];
29028
+ u.push(["boolean", ["feature-state", "hidden"], !1], 0.05), n && u.push(["boolean", ["feature-state", "active"], !1], 0.9), u.push(["boolean", ["feature-state", "selected"], !1], 0.9), u.push(["boolean", ["feature-state", "annotated"], !1], 0.9), o ? u.push(n && !i ? 0.3 : 0.1) : u.push(0.5);
29027
29029
  const T = ["case"];
29028
- T.push(["boolean", ["feature-state", "hidden"], !1], 0.05), n && i && T.push(["boolean", ["feature-state", "active"], !1], 0.9), T.push(["boolean", ["feature-state", "selected"], !1], 0.9), T.push(["boolean", ["feature-state", "annotated"], !1], 0.9), s ? T.push(i && !o ? 0.3 : 0.1) : T.push(0.5);
29029
- const Q = ["case"];
29030
- Q.push(["boolean", ["get", "invisible"], !1], 0.2), Q.push(["boolean", ["feature-state", "selected"], !1], a ? 3 : 1.5), n && i && Q.push(["boolean", ["feature-state", "active"], !1], a ? 2.5 : 1.5), Q.push(["boolean", ["feature-state", "annotated"], !1], 3.5), Q.push(["has", "colour"], 0.7), Q.push(a ? 1 : n && i ? 0.5 : 0.1);
29031
- const p = [
29030
+ T.push(["boolean", ["get", "invisible"], !1], 0.2), T.push(["boolean", ["feature-state", "selected"], !1], s ? 3 : 1.5), n && T.push(["boolean", ["feature-state", "active"], !1], s ? 2.5 : 1.5), T.push(["boolean", ["feature-state", "annotated"], !1], 3.5), T.push(["has", "colour"], 0.7), T.push(s ? 1 : n ? 0.5 : 0.1);
29031
+ const Q = [
29032
29032
  "*",
29033
29033
  [
29034
29034
  "case",
@@ -29036,12 +29036,12 @@ class zit extends P2 {
29036
29036
  ["get", "stroke-width"],
29037
29037
  1
29038
29038
  ],
29039
- Q
29039
+ T
29040
29040
  ];
29041
29041
  return super.changedPaintStyle({
29042
- "line-color": u,
29043
- "line-opacity": T,
29044
- "line-width": p
29042
+ "line-color": a,
29043
+ "line-opacity": u,
29044
+ "line-width": Q
29045
29045
  }, e);
29046
29046
  }
29047
29047
  style(t, e) {
@@ -94037,7 +94037,7 @@ bu = new WeakMap(), Lu = new WeakMap(), wu = new WeakMap(), z2 = new WeakMap(),
94037
94037
  return M(this, El).set(t, e[0].label);
94038
94038
  }
94039
94039
  };
94040
- const L_t = "4.2.5", w_t = 1.4;
94040
+ const L_t = "4.2.6", w_t = 1.4;
94041
94041
  var Jm, td, Sl, J1, ed, rd, I3, iA, oA, T$;
94042
94042
  class A_t {
94043
94043
  // 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.5",
3
+ "version": "4.2.6",
4
4
  "description": "Flatmap viewer using Maplibre GL",
5
5
  "repository": {
6
6
  "type": "git",