ebta-workflow-prod 4.0.20 → 4.0.21
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.
|
Binary file
|
package/package.json
CHANGED
|
@@ -35,6 +35,9 @@ interface Viewer360Props extends FormElementProps<string> {
|
|
|
35
35
|
function Viewer360(props: Viewer360Props): React.ReactElement {
|
|
36
36
|
const { setting, value , pitch ,yaw, hfov, minHfov , haov, vaov, raiseEvent } = props;
|
|
37
37
|
|
|
38
|
+
const handleHotspotClick = (evt: MouseEvent, args: { id: string; pitch: number; yaw: number }) => {
|
|
39
|
+
raiseEvent("clicked", JSON.stringify({ args }))
|
|
40
|
+
};
|
|
38
41
|
|
|
39
42
|
// Copy SVG assets to consumer's public folder and reference them
|
|
40
43
|
React.useEffect(() => {
|
|
@@ -85,7 +88,31 @@ function Viewer360(props: Viewer360Props): React.ReactElement {
|
|
|
85
88
|
raiseEvent("loaded" as any, value);
|
|
86
89
|
console.log("panorama loaded");
|
|
87
90
|
}}
|
|
88
|
-
|
|
91
|
+
>
|
|
92
|
+
<Pannellum.Hotspot
|
|
93
|
+
type="custom"
|
|
94
|
+
pitch={-10}
|
|
95
|
+
yaw={130}
|
|
96
|
+
handleClick={handleHotspotClick}
|
|
97
|
+
handleClickArg={{ id: "btn-1", pitch: -10, yaw: 130 }}
|
|
98
|
+
tooltip={(hotSpotDiv: HTMLElement) => {
|
|
99
|
+
hotSpotDiv.style.cssText = `
|
|
100
|
+
background: #0078d4;
|
|
101
|
+
color: white;
|
|
102
|
+
border: none;
|
|
103
|
+
border-radius: 6px;
|
|
104
|
+
padding: 6px 12px;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
font-size: 13px;
|
|
107
|
+
white-space: nowrap;
|
|
108
|
+
box-shadow: 0 2px 6px rgba(0,0,0,0.3);
|
|
109
|
+
`;
|
|
110
|
+
hotSpotDiv.textContent = "📍 View Detail";
|
|
111
|
+
}}
|
|
112
|
+
tooltipArg={{}}
|
|
113
|
+
/>
|
|
114
|
+
|
|
115
|
+
</Pannellum>
|
|
89
116
|
</>
|
|
90
117
|
);
|
|
91
118
|
}
|