gralobe 1.0.41 → 1.0.42

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/dist/gralobe.js CHANGED
@@ -4274,12 +4274,24 @@ class it {
4274
4274
  updateFeatureLabels() {
4275
4275
  this.featureLabels = this.countries.map((e) => {
4276
4276
  const t = this.computeCentroid(e);
4277
- return t ? {
4277
+ if (!t) return null;
4278
+ let i = e.properties?.name || e.properties?.NAME || e.properties?.Name || e.properties?.label || e.properties?.LABEL || "";
4279
+ if (!i && e.properties) {
4280
+ const n = Object.keys(e.properties);
4281
+ for (const r of n) {
4282
+ const s = r.toLowerCase(), o = e.properties[r];
4283
+ if (typeof o == "string" && (s.includes("name") || s.includes("label") || s.includes("title"))) {
4284
+ i = o;
4285
+ break;
4286
+ }
4287
+ }
4288
+ }
4289
+ return {
4278
4290
  id: String(e.id || e.properties?.id || ""),
4279
- name: e.properties?.name || e.properties?.NAME || e.properties?.Name || "",
4291
+ name: i,
4280
4292
  lat: t[1],
4281
4293
  lon: t[0]
4282
- } : null;
4294
+ };
4283
4295
  }).filter(
4284
4296
  (e) => e !== null && e.id !== "" && e.name !== ""
4285
4297
  );
@@ -4950,11 +4962,14 @@ class $a {
4950
4962
  case "capitals":
4951
4963
  n = !0;
4952
4964
  break;
4965
+ case "all-countries":
4966
+ n = !0;
4967
+ break;
4953
4968
  case "data":
4954
4969
  n = this.dataIds.has(i);
4955
4970
  break;
4956
4971
  }
4957
- t.element.classList.toggle("hidden", !n);
4972
+ e === "all-countries" && t.element.classList.contains("custom-label") && (n = !1), t.element.classList.toggle("hidden", !n);
4958
4973
  }), this.labelRenderer.domElement.className = `label-style-${e}`;
4959
4974
  }
4960
4975
  /**