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.
- package/README.md +1 -1
- package/dist/core/ci-hotspot.d.ts +1 -1
- package/dist/core/ci-hotspot.d.ts.map +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/types.d.ts +2 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.cjs.js +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.cjs.js.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.esm.js +9 -7
- package/dist/editor/js-cloudimage-hotspot-editor.esm.js.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.min.js +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.min.js.map +1 -1
- package/dist/js-cloudimage-hotspot.cjs.js +1 -1
- package/dist/js-cloudimage-hotspot.cjs.js.map +1 -1
- package/dist/js-cloudimage-hotspot.esm.js +9 -7
- package/dist/js-cloudimage-hotspot.esm.js.map +1 -1
- package/dist/js-cloudimage-hotspot.min.js +1 -1
- package/dist/js-cloudimage-hotspot.min.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +27 -25
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -15,7 +15,8 @@ const et = {
|
|
|
15
15
|
markerTheme: "default",
|
|
16
16
|
brandColor: "#00aaff",
|
|
17
17
|
fullscreenButton: !0,
|
|
18
|
-
zoomControlsPosition: "bottom-right"
|
|
18
|
+
zoomControlsPosition: "bottom-right",
|
|
19
|
+
popoverTextAlign: "left"
|
|
19
20
|
}, ot = {
|
|
20
21
|
"data-ci-hotspot-src": { key: "src", type: "string" },
|
|
21
22
|
"data-ci-hotspot-alt": { key: "alt", type: "string" },
|
|
@@ -43,7 +44,8 @@ const et = {
|
|
|
43
44
|
"data-ci-hotspot-marker-theme": { key: "markerTheme", type: "string" },
|
|
44
45
|
"data-ci-hotspot-brand-color": { key: "brandColor", type: "string" },
|
|
45
46
|
"data-ci-hotspot-fullscreen-button": { key: "fullscreenButton", type: "boolean" },
|
|
46
|
-
"data-ci-hotspot-zoom-controls-position": { key: "zoomControlsPosition", type: "string" }
|
|
47
|
+
"data-ci-hotspot-zoom-controls-position": { key: "zoomControlsPosition", type: "string" },
|
|
48
|
+
"data-ci-hotspot-popover-text-align": { key: "popoverTextAlign", type: "string" }
|
|
47
49
|
};
|
|
48
50
|
function it(s) {
|
|
49
51
|
const t = {}, e = {};
|
|
@@ -908,7 +910,7 @@ const Wt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
908
910
|
applyTheme() {
|
|
909
911
|
this.config.theme === "dark" ? u(this.containerEl, "ci-hotspot-theme-dark") : v(this.containerEl, "ci-hotspot-theme-dark");
|
|
910
912
|
const t = this.config.markerTheme && this.config.markerTheme !== "default" ? this.config.markerTheme : this.config.invertMarkerTheme ? "inverted" : "default";
|
|
911
|
-
v(this.containerEl, "ci-hotspot-marker-inverted"), v(this.containerEl, "ci-hotspot-marker-brand"), this.containerEl.style.removeProperty("--ci-hotspot-brand-color"), t === "inverted" ? u(this.containerEl, "ci-hotspot-marker-inverted") : t === "brand" && u(this.containerEl, "ci-hotspot-marker-brand"), this.config.brandColor && this.containerEl.style.setProperty("--ci-hotspot-brand-color", this.config.brandColor);
|
|
913
|
+
v(this.containerEl, "ci-hotspot-marker-inverted"), v(this.containerEl, "ci-hotspot-marker-brand"), this.containerEl.style.removeProperty("--ci-hotspot-brand-color"), t === "inverted" ? u(this.containerEl, "ci-hotspot-marker-inverted") : t === "brand" && u(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");
|
|
912
914
|
}
|
|
913
915
|
setupImage() {
|
|
914
916
|
const t = () => {
|
|
@@ -1001,13 +1003,13 @@ const Wt = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1001
1003
|
});
|
|
1002
1004
|
this.popovers.set(t.id, l), l.mount(this.containerEl, n), this.bindTrigger(t, n, l, r), r === "load" && this.imageLoaded && (this.closeAll(), l.show(), m(n, !0), this.ensureFocusTrap(t.id, l.element, n), (d = this.focusTraps.get(t.id)) == null || d.activate());
|
|
1003
1005
|
}
|
|
1004
|
-
/** For navigateTo hotspots without explicit data/content, generate popover content from the destination scene */
|
|
1006
|
+
/** For navigateTo hotspots without explicit data/content, generate popover content from the destination scene or label */
|
|
1005
1007
|
enrichNavigateHotspot(t) {
|
|
1006
1008
|
if (t.data || t.content) return t;
|
|
1007
|
-
const e = this.scenesMap.get(t.navigateTo);
|
|
1008
|
-
return
|
|
1009
|
+
const e = this.scenesMap.get(t.navigateTo), o = t.label || (e == null ? void 0 : e.alt) || (e == null ? void 0 : e.id);
|
|
1010
|
+
return o ? {
|
|
1009
1011
|
...t,
|
|
1010
|
-
data: { title:
|
|
1012
|
+
data: { title: o }
|
|
1011
1013
|
} : t;
|
|
1012
1014
|
}
|
|
1013
1015
|
bindNavigateTrigger(t, e, o) {
|