js-cloudimage-hotspot 1.1.9 → 1.1.11

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.
@@ -67,7 +67,8 @@ const nt = {
67
67
  markerTheme: "default",
68
68
  brandColor: "#00aaff",
69
69
  fullscreenButton: !0,
70
- zoomControlsPosition: "bottom-right"
70
+ zoomControlsPosition: "bottom-right",
71
+ popoverTextAlign: "left"
71
72
  }, at = {
72
73
  "data-ci-hotspot-src": { key: "src", type: "string" },
73
74
  "data-ci-hotspot-alt": { key: "alt", type: "string" },
@@ -95,7 +96,8 @@ const nt = {
95
96
  "data-ci-hotspot-marker-theme": { key: "markerTheme", type: "string" },
96
97
  "data-ci-hotspot-brand-color": { key: "brandColor", type: "string" },
97
98
  "data-ci-hotspot-fullscreen-button": { key: "fullscreenButton", type: "boolean" },
98
- "data-ci-hotspot-zoom-controls-position": { key: "zoomControlsPosition", type: "string" }
99
+ "data-ci-hotspot-zoom-controls-position": { key: "zoomControlsPosition", type: "string" },
100
+ "data-ci-hotspot-popover-text-align": { key: "popoverTextAlign", type: "string" }
99
101
  };
100
102
  function ct(n) {
101
103
  const t = {}, e = {};
@@ -927,7 +929,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
927
929
  applyTheme() {
928
930
  this.config.theme === "dark" ? m(this.containerEl, "ci-hotspot-theme-dark") : b(this.containerEl, "ci-hotspot-theme-dark");
929
931
  const t = this.config.markerTheme && this.config.markerTheme !== "default" ? this.config.markerTheme : this.config.invertMarkerTheme ? "inverted" : "default";
930
- b(this.containerEl, "ci-hotspot-marker-inverted"), b(this.containerEl, "ci-hotspot-marker-brand"), this.containerEl.style.removeProperty("--ci-hotspot-brand-color"), t === "inverted" ? m(this.containerEl, "ci-hotspot-marker-inverted") : t === "brand" && m(this.containerEl, "ci-hotspot-marker-brand"), this.config.brandColor && this.containerEl.style.setProperty("--ci-hotspot-brand-color", this.config.brandColor);
932
+ b(this.containerEl, "ci-hotspot-marker-inverted"), b(this.containerEl, "ci-hotspot-marker-brand"), this.containerEl.style.removeProperty("--ci-hotspot-brand-color"), t === "inverted" ? m(this.containerEl, "ci-hotspot-marker-inverted") : t === "brand" && m(this.containerEl, "ci-hotspot-marker-brand"), this.config.brandColor && this.containerEl.style.setProperty("--ci-hotspot-brand-color", this.config.brandColor), this.config.popoverTextAlign ? this.containerEl.style.setProperty("--ci-hotspot-popover-text-align", this.config.popoverTextAlign) : this.containerEl.style.removeProperty("--ci-hotspot-popover-text-align");
931
933
  }
932
934
  setupImage() {
933
935
  const t = () => {
@@ -1020,13 +1022,13 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
1020
1022
  });
1021
1023
  this.popovers.set(t.id, l), l.mount(this.containerEl, s), this.bindTrigger(t, s, l, a), a === "load" && this.imageLoaded && (this.closeAll(), l.show(), v(s, !0), this.ensureFocusTrap(t.id, l.element, s), (u = this.focusTraps.get(t.id)) == null || u.activate());
1022
1024
  }
1023
- /** For navigateTo hotspots without explicit data/content, generate popover content from the destination scene */
1025
+ /** For navigateTo hotspots without explicit data/content, generate popover content from the destination scene or label */
1024
1026
  enrichNavigateHotspot(t) {
1025
1027
  if (t.data || t.content) return t;
1026
- const e = this.scenesMap.get(t.navigateTo);
1027
- return e ? {
1028
+ const e = this.scenesMap.get(t.navigateTo), i = t.label || (e == null ? void 0 : e.alt) || (e == null ? void 0 : e.id);
1029
+ return i ? {
1028
1030
  ...t,
1029
- data: { title: t.label || e.alt || e.id }
1031
+ data: { title: i }
1030
1032
  } : t;
1031
1033
  }
1032
1034
  bindNavigateTrigger(t, e, i) {