js-cloudimage-360-view 4.9.3 → 4.9.4

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
@@ -101,7 +101,7 @@ Add the library via CDN and create your first 360 viewer in seconds:
101
101
 
102
102
  ```html
103
103
  <!-- Add the library (CSS is auto-injected) -->
104
- <script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.3/js-cloudimage-360-view.min.js?vh=997be0&func=proxy"></script>
104
+ <script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.4/js-cloudimage-360-view.min.js?vh=32f739&func=proxy"></script>
105
105
 
106
106
  <!-- Create a container with data attributes -->
107
107
  <div
@@ -125,7 +125,7 @@ Add the library via CDN and create your first 360 viewer in seconds:
125
125
  ### Option 1: CDN (Recommended for Quick Setup)
126
126
 
127
127
  ```html
128
- <script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.3/js-cloudimage-360-view.min.js?vh=997be0&func=proxy"></script>
128
+ <script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.4/js-cloudimage-360-view.min.js?vh=32f739&func=proxy"></script>
129
129
  ```
130
130
 
131
131
  > **Note:** CSS is automatically injected by the script - no separate stylesheet needed.
@@ -514,6 +514,8 @@ All options can be set via JavaScript config or HTML data attributes.
514
514
  | `theme` | `data-theme` | `null` | Color theme: `'light'` or `'dark'` |
515
515
  | `hotspotTrigger` | `data-hotspot-trigger` | `'hover'` | Hotspot trigger mode: `'hover'` or `'click'` |
516
516
  | `hotspotTimelineOnClick` | `data-hotspot-timeline-on-click` | `true` | Show hotspot popup when clicking timeline dot |
517
+ | `markerTheme` | `data-marker-theme` | `null` | Hotspot marker theme: `'default'`, `'inverted'`, or `'brand'` |
518
+ | `brandColor` | `data-brand-color` | `null` | Brand accent color for `'brand'` marker theme (e.g. `'#ff6600'`) |
517
519
 
518
520
  ### Cloudimage CDN Options
519
521
 
@@ -612,9 +614,14 @@ const config = {
612
614
  | `orientation` | Yes | `'x'` or `'y'` axis |
613
615
  | `containerSize` | Yes | `[width, height]` reference dimensions |
614
616
  | `positions` | Yes | Object mapping frame index to `{ x, y }` coordinates |
615
- | `content` | Yes | HTML content for the tooltip |
617
+ | `content` | No | HTML content for the tooltip |
616
618
  | `label` | No | Short label for the hotspot (used in timeline tooltips) |
617
619
  | `onClick` | No | Click handler function |
620
+ | `keepOpen` | No | If `true`, the popover stays open until explicitly closed |
621
+ | `className` | No | Custom CSS class(es) to add to the hotspot element |
622
+ | `markerTheme` | No | Per-hotspot theme override: `'default'`, `'inverted'`, or `'brand'` |
623
+ | `navigateTo` | No | Scene ID to navigate to on click (turns hotspot into a navigation pin) |
624
+ | `arrowDirection` | No | Rotation angle (degrees) for the navigation arrow icon. Only applies when `navigateTo` is set |
618
625
 
619
626
  ### Hotspot Timeline
620
627
 
@@ -710,6 +717,76 @@ Customize the timeline appearance with CSS variables:
710
717
  }
711
718
  ```
712
719
 
720
+ ### Marker Themes
721
+
722
+ Control the visual appearance of hotspot markers at the viewer level or per-hotspot.
723
+
724
+ **Viewer-level theme** applies to all hotspots:
725
+
726
+ ```javascript
727
+ const config = {
728
+ hotspots: [...],
729
+ markerTheme: 'inverted', // 'default', 'inverted', or 'brand'
730
+ brandColor: '#ff6600', // Used when markerTheme is 'brand'
731
+ };
732
+ ```
733
+
734
+ **Per-hotspot theme** overrides the viewer-level theme for individual markers:
735
+
736
+ ```javascript
737
+ const hotspots = [
738
+ {
739
+ id: 'highlight',
740
+ markerTheme: 'brand', // Override for this hotspot only
741
+ positions: { 0: { x: 500, y: 300 } },
742
+ content: '<div>Highlighted feature</div>',
743
+ // ...
744
+ },
745
+ {
746
+ id: 'subtle',
747
+ markerTheme: 'inverted', // Different override
748
+ positions: { 5: { x: 200, y: 150 } },
749
+ content: '<div>Subtle marker</div>',
750
+ // ...
751
+ },
752
+ ];
753
+ ```
754
+
755
+ | Theme | Description |
756
+ |-------|-------------|
757
+ | `'default'` | Light marker on light backgrounds (default) |
758
+ | `'inverted'` | Dark marker that blends with dark backgrounds |
759
+ | `'brand'` | Uses `brandColor` as the marker accent color |
760
+
761
+ All themes adapt automatically to the `theme: 'dark'` setting.
762
+
763
+ ### Navigation Hotspots
764
+
765
+ Hotspots with a `navigateTo` property become navigation pins that link between scenes:
766
+
767
+ ```javascript
768
+ const hotspots = [
769
+ {
770
+ id: 'go-to-interior',
771
+ navigateTo: 'interior-scene',
772
+ label: 'View Interior',
773
+ arrowDirection: 90, // Point downward (default is right)
774
+ positions: { 10: { x: 600, y: 400 } },
775
+ // ...
776
+ },
777
+ ];
778
+
779
+ const config = {
780
+ hotspots,
781
+ onNavigate: (sceneId) => {
782
+ // Handle scene transition
783
+ console.log(`Navigate to: ${sceneId}`);
784
+ },
785
+ };
786
+ ```
787
+
788
+ Navigation hotspots display a directional arrow icon. Use `arrowDirection` to rotate the arrow (in degrees, default `0` points right).
789
+
713
790
  ---
714
791
 
715
792
  ## Interaction Hints