ebta-workflow-prod 4.0.4 → 4.0.5

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ebta-workflow-prod",
3
3
  "private": false,
4
- "version": "4.0.4",
4
+ "version": "4.0.5",
5
5
  "description": "",
6
6
  "license": "UNLICENSED",
7
7
  "author": "",
@@ -13,7 +13,7 @@ import { Pannellum } from "pannellum-react-update";
13
13
  * `props.setProperty(key, value)`.
14
14
  */
15
15
  interface Viewer360V2Props extends FormElementProps<string> {
16
- value: string //url of image
16
+ value: string //url of image
17
17
  pitch: number; //pitch of the image
18
18
  yaw: number; //yaw of the image
19
19
  hfov: number; //horizontal field of view
@@ -33,18 +33,22 @@ interface Viewer360V2Props extends FormElementProps<string> {
33
33
  * @param props The props that will be provided by the Workflow runtime.
34
34
  */
35
35
  function Viewer360V2(props: Viewer360V2Props): React.ReactElement {
36
- const { setting, value , pitch ,yaw, hfov, minHfov , haov, vaov, raiseEvent } = props;
37
-
36
+ const { setting, value, pitch, yaw, hfov, minHfov, haov, vaov, raiseEvent } = props;
37
+
38
38
 
39
39
  // Copy SVG assets to consumer's public folder and reference them
40
40
  React.useEffect(() => {
41
41
  // Ensure pannellum CSS has correct asset paths
42
42
  const customCSS = `
43
43
  .pnlm-container {
44
- background-image: url('/img/background.svg');
44
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="67" height="100" viewBox="0 0 67 100">
45
+ <path stroke="#ccc" fill="none" d="M33.5,50,0,63,33.5,75,67,63,33.5,50m-33.5-50,67,25m-0.5,0,0,75m-66.5-75,67-25m-33.5,75,0,25m0-100,0,50"/>
46
+ </svg>");
45
47
  }
46
48
  .pnlm-compass {
47
- background-image: url ('/img/compass.svg');
49
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="50" width="50">
50
+ <path d="m24.5078 6-3.2578 18h7.5l-3.25781-18h-0.984376zm-3.2578 20 3.2578 18h0.9844l3.2578-18h-7.5zm1.19531 0.9941h5.10938l-2.5547 14.1075-2.5547-14.1075z"/>
51
+ </svg>");
48
52
  }
49
53
  .pnlm-grab {
50
54
  cursor: url( '/img/grab.svg'), grab;
@@ -53,20 +57,33 @@ function Viewer360V2(props: Viewer360V2Props): React.ReactElement {
53
57
  cursor: url( '/img/grabbing.svg'), grabbing;
54
58
  }
55
59
  .pnlm-sprite {
56
- background-image: url( '/img/sprites.svg');
60
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="26" height="208">
61
+ <circle fill-opacity=".78" cy="117" cx="13" r="11" fill="#fff"/>
62
+ <circle fill-opacity=".78" cy="143" cx="13" r="11" fill="#fff"/>
63
+ <circle cy="169" cx="13" r="7" fill="none" stroke="#000" stroke-width="2"/>
64
+ <circle cy="195" cx="13" r="7" fill="none" stroke="#000" stroke-width="2"/>
65
+ <circle cx="13" cy="195" r="2.5"/>
66
+ <path d="m5 83v6h2v-4h4v-2zm10 0v2h4v4h2v-6zm-5 5v6h6v-6zm-5 5v6h6v-2h-4v-4zm14 0v4h-4v2h6v-6z"/>
67
+ <path d="m13 110a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1 3h2v2h-2zm0 3h2v5h-2z"/>
68
+ <path d="m5 57v6h2v-4h4v-2zm10 0v2h4v4h2v-6zm-10 10v6h6v-2h-4v-4zm14 0v4h-4v2h6v-6z"/>
69
+ <path d="m17 38v2h-8v-2z"/>
70
+ <path d="m12 9v3h-3v2h3v3h2v-3h3v-2h-3v-3z"/>
71
+ <path d="m13 136-6.125 6.125h4.375v7.875h3.5v-7.875h4.375z"/>
72
+ <path d="m10.428 173.33v-5.77l5-2.89v5.77zm1-1.73 3-1.73-3.001-1.74z"/>
73
+ </svg>");
57
74
  }
58
75
  `;
59
-
76
+
60
77
  const styleElement = document.createElement('style');
61
78
  styleElement.textContent = customCSS;
62
79
  document.head.appendChild(styleElement);
63
-
80
+
64
81
  return () => {
65
82
  document.head.removeChild(styleElement);
66
83
  };
67
84
  }, []);
68
-
69
-
85
+
86
+
70
87
  console.log("rendering 360VIEWER")
71
88
  return (
72
89
  <>
@@ -92,7 +109,7 @@ function Viewer360V2(props: Viewer360V2Props): React.ReactElement {
92
109
 
93
110
  const Viewer360V2ElementRegistration: FormElementRegistration<Viewer360V2Props> = {
94
111
  component: Viewer360V2,
95
- getInitialProperties: () => ({ }),
112
+ getInitialProperties: () => ({}),
96
113
  id: "Viewer360V2",
97
114
  };
98
115
 
package/src/index.ts CHANGED
@@ -37,9 +37,9 @@ export { default as CreateGraphicLayerActivity } from "./activities/CreateGraphi
37
37
  export { default as SliceLineActivity } from "./activities/SliceLine";
38
38
  export { default as GetTaskStatusActivity } from "./activities/GetTaskStatus";
39
39
  export { default as DrapGeometryActivity } from "./activities/DrapGeometry";
40
-
41
- export { default as SampleActivity } from "./activities/Sample";
42
-
43
- export { default as SampleInputRegistration } from "./elements/SampleInput";
44
-
45
- export { default as Viewer360V2Registration } from "./elements/Viewer360V2";
40
+
41
+ export { default as SampleActivity } from "./activities/Sample";
42
+
43
+ export { default as SampleInputRegistration } from "./elements/SampleInput";
44
+
45
+ export { default as Viewer360V2Registration } from "./elements/Viewer360V2";