@shapediver/viewer.shared.node-tree 3.16.7 → 3.16.9

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.
Files changed (64) hide show
  1. package/dist/implementation/AbstractTreeNodeData.d.ts +33 -33
  2. package/dist/implementation/AbstractTreeNodeData.js +81 -81
  3. package/dist/implementation/AbstractTreeNodeData.js.map +1 -1
  4. package/dist/implementation/Tree.d.ts +13 -13
  5. package/dist/implementation/Tree.js +115 -115
  6. package/dist/implementation/Tree.js.map +1 -1
  7. package/dist/implementation/TreeNode.d.ts +78 -78
  8. package/dist/implementation/TreeNode.js +432 -432
  9. package/dist/implementation/TreeNode.js.map +1 -1
  10. package/dist/implementation/data/AnimationData.d.ts +32 -32
  11. package/dist/implementation/data/AnimationData.js +290 -290
  12. package/dist/implementation/data/AnimationData.js.map +1 -1
  13. package/dist/implementation/data/ChunkData.d.ts +14 -14
  14. package/dist/implementation/data/ChunkData.js +46 -46
  15. package/dist/implementation/data/ChunkData.js.map +1 -1
  16. package/dist/implementation/data/CustomData.d.ts +24 -24
  17. package/dist/implementation/data/CustomData.js +50 -50
  18. package/dist/implementation/data/GeometryData.d.ts +100 -100
  19. package/dist/implementation/data/GeometryData.js +326 -326
  20. package/dist/implementation/data/GeometryData.js.map +1 -1
  21. package/dist/implementation/data/HTMLElementAnchorData.d.ts +102 -102
  22. package/dist/implementation/data/HTMLElementAnchorData.js +273 -273
  23. package/dist/implementation/data/HTMLElementAnchorData.js.map +1 -1
  24. package/dist/implementation/data/InstanceData.d.ts +21 -21
  25. package/dist/implementation/data/InstanceData.js +58 -58
  26. package/dist/implementation/material/AbstractMaterialData.d.ts +68 -68
  27. package/dist/implementation/material/AbstractMaterialData.js +224 -224
  28. package/dist/implementation/material/MapData.d.ts +53 -53
  29. package/dist/implementation/material/MapData.js +190 -190
  30. package/dist/implementation/material/MaterialBasicLineData.d.ts +14 -14
  31. package/dist/implementation/material/MaterialBasicLineData.js +90 -90
  32. package/dist/implementation/material/MaterialGemData.d.ts +46 -46
  33. package/dist/implementation/material/MaterialGemData.js +288 -288
  34. package/dist/implementation/material/MaterialLambertData.d.ts +21 -21
  35. package/dist/implementation/material/MaterialLambertData.js +146 -146
  36. package/dist/implementation/material/MaterialMultiPointData.d.ts +99 -99
  37. package/dist/implementation/material/MaterialMultiPointData.js +650 -650
  38. package/dist/implementation/material/MaterialPhongData.d.ts +25 -25
  39. package/dist/implementation/material/MaterialPhongData.js +170 -170
  40. package/dist/implementation/material/MaterialPointData.d.ts +19 -19
  41. package/dist/implementation/material/MaterialPointData.js +131 -131
  42. package/dist/implementation/material/MaterialShadowData.d.ts +14 -14
  43. package/dist/implementation/material/MaterialShadowData.js +35 -35
  44. package/dist/implementation/material/MaterialSpecularGlossinessData.d.ts +27 -27
  45. package/dist/implementation/material/MaterialSpecularGlossinessData.js +179 -179
  46. package/dist/implementation/material/MaterialStandardData.d.ts +75 -75
  47. package/dist/implementation/material/MaterialStandardData.js +467 -467
  48. package/dist/implementation/material/MaterialUnlitData.d.ts +17 -17
  49. package/dist/implementation/material/MaterialUnlitData.js +119 -119
  50. package/dist/implementation/material/MaterialVariantsData.d.ts +15 -15
  51. package/dist/implementation/material/MaterialVariantsData.js +61 -61
  52. package/dist/implementation/material/MaterialVariantsData.js.map +1 -1
  53. package/dist/implementation/sdtf/SDTFAttributesData.d.ts +22 -22
  54. package/dist/implementation/sdtf/SDTFAttributesData.js +99 -99
  55. package/dist/implementation/sdtf/SDTFAttributesData.js.map +1 -1
  56. package/dist/implementation/sdtf/SDTFItemData.d.ts +18 -18
  57. package/dist/implementation/sdtf/SDTFItemData.js +59 -59
  58. package/dist/implementation/sdtf/SDTFItemData.js.map +1 -1
  59. package/dist/implementation/sdtf/SDTFOverviewData.d.ts +12 -12
  60. package/dist/implementation/sdtf/SDTFOverviewData.js +106 -106
  61. package/dist/implementation/sdtf/SDTFOverviewData.js.map +1 -1
  62. package/dist/index.d.ts +35 -35
  63. package/dist/index.js +59 -59
  64. package/package.json +6 -6
@@ -1,274 +1,274 @@
1
- "use strict";
2
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
- if (kind === "m") throw new TypeError("Private method is not writable");
4
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
- };
8
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
- };
13
- var _HTMLElementAnchorData_viewerHtmlElement, _HTMLElementAnchorData_data, _HTMLElementAnchorData_format, _HTMLElementAnchorData_hideable, _HTMLElementAnchorData_intersectionTarget, _HTMLElementAnchorData_location, _HTMLElementAnchorData_viewports, _HTMLElementAnchorCustomData_create, _HTMLElementAnchorCustomData_update;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.HTMLElementAnchorCustomData = exports.HTMLElementAnchorImageData = exports.HTMLElementAnchorTextData = exports.HTMLElementAnchorData = void 0;
16
- const AbstractTreeNodeData_1 = require("../AbstractTreeNodeData");
17
- class HTMLElementAnchorData extends AbstractTreeNodeData_1.AbstractTreeNodeData {
18
- // #endregion Properties (9)
19
- // #region Constructors (1)
20
- /**
21
- * Creates a custom data node.
22
- *
23
- * @param _data the data as key- value pairs
24
- * @param id the id
25
- */
26
- constructor(properties) {
27
- super(properties.id, properties.version);
28
- _HTMLElementAnchorData_viewerHtmlElement.set(this, {});
29
- _HTMLElementAnchorData_data.set(this, void 0);
30
- _HTMLElementAnchorData_format.set(this, void 0);
31
- _HTMLElementAnchorData_hideable.set(this, true);
32
- _HTMLElementAnchorData_intersectionTarget.set(this, void 0);
33
- _HTMLElementAnchorData_location.set(this, void 0);
34
- _HTMLElementAnchorData_viewports.set(this, []);
35
- __classPrivateFieldSet(this, _HTMLElementAnchorData_location, properties.location, "f");
36
- __classPrivateFieldSet(this, _HTMLElementAnchorData_data, properties.data, "f");
37
- __classPrivateFieldSet(this, _HTMLElementAnchorData_format, properties.format, "f");
38
- __classPrivateFieldSet(this, _HTMLElementAnchorData_hideable, properties.hideable === undefined ? true : properties.hideable, "f");
39
- __classPrivateFieldSet(this, _HTMLElementAnchorData_viewports, properties.viewports || [], "f");
40
- __classPrivateFieldSet(this, _HTMLElementAnchorData_intersectionTarget, properties.intersectionTarget, "f");
41
- this.internalHtmlElement = (document.createElement("div"));
42
- this.internalHtmlElement.classList.add("sdv-anchor-inner-container");
43
- }
44
- // #endregion Constructors (1)
45
- // #region Public Accessors (12)
46
- get data() {
47
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_data, "f");
48
- }
49
- set data(value) {
50
- __classPrivateFieldSet(this, _HTMLElementAnchorData_data, value, "f");
51
- }
52
- get format() {
53
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_format, "f");
54
- }
55
- set format(value) {
56
- __classPrivateFieldSet(this, _HTMLElementAnchorData_format, value, "f");
57
- }
58
- get hideable() {
59
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_hideable, "f");
60
- }
61
- set hideable(value) {
62
- __classPrivateFieldSet(this, _HTMLElementAnchorData_hideable, value, "f");
63
- }
64
- get intersectionTarget() {
65
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_intersectionTarget, "f");
66
- }
67
- set intersectionTarget(value) {
68
- __classPrivateFieldSet(this, _HTMLElementAnchorData_intersectionTarget, value, "f");
69
- }
70
- get location() {
71
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_location, "f");
72
- }
73
- set location(value) {
74
- __classPrivateFieldSet(this, _HTMLElementAnchorData_location, value, "f");
75
- }
76
- get viewports() {
77
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewports, "f");
78
- }
79
- set viewports(value) {
80
- __classPrivateFieldSet(this, _HTMLElementAnchorData_viewports, value, "f");
81
- }
82
- // #endregion Public Accessors (12)
83
- // #region Public Methods (3)
84
- createViewerHtmlElement(viewer) {
85
- if (__classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer])
86
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer];
87
- if (this.viewports.includes(viewer) || this.viewports.length === 0) {
88
- __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer] = (this.internalHtmlElement.cloneNode(true));
89
- this.create({
90
- anchor: this,
91
- parent: __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer],
92
- });
93
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer];
94
- }
95
- return null;
96
- }
97
- getViewerHtmlElement(viewer) {
98
- if (__classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer])
99
- return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer];
100
- return null;
101
- }
102
- update(properties) {
103
- properties.htmlElement.style.display = "";
104
- if ((this.hideable && properties.hidden) ||
105
- properties.visible === false)
106
- properties.htmlElement.style.display = "none";
107
- let x, y;
108
- if (this.data.position && this.data.position.horizontal === "right") {
109
- x = properties.container[0] - properties.htmlElement.offsetWidth;
110
- }
111
- else if (this.data.position &&
112
- this.data.position.horizontal === "left") {
113
- x = properties.container[0];
114
- }
115
- else {
116
- x =
117
- properties.container[0] -
118
- properties.htmlElement.offsetWidth / 2;
119
- }
120
- if (this.data.position && this.data.position.vertical === "bottom") {
121
- y = properties.container[1] - properties.htmlElement.offsetHeight;
122
- }
123
- else if (this.data.position &&
124
- this.data.position.vertical === "top") {
125
- y = properties.container[1];
126
- }
127
- else {
128
- y =
129
- properties.container[1] -
130
- properties.htmlElement.offsetHeight / 2;
131
- }
132
- x = x / properties.scale[0];
133
- y = y / properties.scale[1];
134
- properties.htmlElement.style.left = x + "px";
135
- properties.htmlElement.style.top = y + "px";
136
- }
137
- }
138
- exports.HTMLElementAnchorData = HTMLElementAnchorData;
139
- _HTMLElementAnchorData_viewerHtmlElement = new WeakMap(), _HTMLElementAnchorData_data = new WeakMap(), _HTMLElementAnchorData_format = new WeakMap(), _HTMLElementAnchorData_hideable = new WeakMap(), _HTMLElementAnchorData_intersectionTarget = new WeakMap(), _HTMLElementAnchorData_location = new WeakMap(), _HTMLElementAnchorData_viewports = new WeakMap();
140
- class HTMLElementAnchorTextData extends HTMLElementAnchorData {
141
- // #region Constructors (1)
142
- constructor(properties) {
143
- super({
144
- location: properties.location,
145
- data: properties.data,
146
- format: "text",
147
- hideable: properties.hideable,
148
- viewports: properties.viewports,
149
- intersectionTarget: properties.intersectionTarget,
150
- id: properties.id,
151
- version: properties.version,
152
- });
153
- }
154
- // #endregion Constructors (1)
155
- // #region Public Methods (1)
156
- clone() {
157
- return new HTMLElementAnchorTextData({
158
- location: this.location,
159
- data: this.data,
160
- hideable: this.hideable,
161
- viewports: this.viewports,
162
- intersectionTarget: this.intersectionTarget,
163
- id: this.id,
164
- version: this.version,
165
- });
166
- }
167
- // #endregion Public Methods (1)
168
- // #region Private Methods (1)
169
- create(properties) {
170
- var _a;
171
- const span = document.createElement("span");
172
- span.classList.add("sdv-anchor-text");
173
- span.style.color = (_a = properties.anchor.data.color) === null || _a === void 0 ? void 0 : _a.toString();
174
- span.textContent = properties.anchor.data.text;
175
- properties.parent.appendChild(span);
176
- if (properties.anchor.data.textAlign &&
177
- (properties.anchor.data.textAlign === "right" ||
178
- properties.anchor.data.textAlign === "center")) {
179
- span.style.textAlign = properties.anchor.data.textAlign;
180
- }
181
- else {
182
- span.style.textAlign = "left";
183
- }
184
- }
185
- }
186
- exports.HTMLElementAnchorTextData = HTMLElementAnchorTextData;
187
- class HTMLElementAnchorImageData extends HTMLElementAnchorData {
188
- // #region Constructors (1)
189
- constructor(properties) {
190
- super({
191
- location: properties.location,
192
- data: properties.data,
193
- format: "image",
194
- hideable: properties.hideable,
195
- viewports: properties.viewports,
196
- intersectionTarget: properties.intersectionTarget,
197
- id: properties.id,
198
- version: properties.version,
199
- });
200
- }
201
- // #endregion Constructors (1)
202
- // #region Public Methods (1)
203
- clone() {
204
- return new HTMLElementAnchorImageData({
205
- location: this.location,
206
- data: this.data,
207
- hideable: this.hideable,
208
- viewports: this.viewports,
209
- intersectionTarget: this.intersectionTarget,
210
- id: this.id,
211
- version: this.version,
212
- });
213
- }
214
- // #endregion Public Methods (1)
215
- // #region Private Methods (1)
216
- create(properties) {
217
- const img = document.createElement("img");
218
- img.classList.add("sdv-anchor-image");
219
- properties.parent.appendChild(img);
220
- img.src = properties.anchor.data.src;
221
- if (properties.anchor.data.height)
222
- img.height = properties.anchor.data.height;
223
- if (properties.anchor.data.width)
224
- img.width = properties.anchor.data.width;
225
- if (properties.anchor.data.alt)
226
- img.alt = properties.anchor.data.alt;
227
- }
228
- }
229
- exports.HTMLElementAnchorImageData = HTMLElementAnchorImageData;
230
- class HTMLElementAnchorCustomData extends HTMLElementAnchorData {
231
- // #endregion Properties (1)
232
- // #region Constructors (1)
233
- constructor(properties) {
234
- super({
235
- location: properties.location,
236
- data: properties.data,
237
- format: "custom",
238
- hideable: properties.hideable,
239
- viewports: properties.viewports,
240
- intersectionTarget: properties.intersectionTarget,
241
- id: properties.id,
242
- version: properties.version,
243
- });
244
- // #region Properties (1)
245
- _HTMLElementAnchorCustomData_create.set(this, void 0);
246
- _HTMLElementAnchorCustomData_update.set(this, void 0);
247
- __classPrivateFieldSet(this, _HTMLElementAnchorCustomData_create, properties.create, "f");
248
- __classPrivateFieldSet(this, _HTMLElementAnchorCustomData_update, properties.update, "f");
249
- }
250
- // #endregion Constructors (1)
251
- create(properties) {
252
- __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_create, "f").call(this, properties);
253
- }
254
- update(properties) {
255
- __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_update, "f").call(this, properties);
256
- }
257
- // #region Public Methods (1)
258
- clone() {
259
- return new HTMLElementAnchorCustomData({
260
- location: this.location,
261
- data: this.data,
262
- hideable: this.hideable,
263
- viewports: this.viewports,
264
- intersectionTarget: this.intersectionTarget,
265
- id: this.id,
266
- version: this.version,
267
- create: __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_create, "f"),
268
- update: __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_update, "f"),
269
- });
270
- }
271
- }
272
- exports.HTMLElementAnchorCustomData = HTMLElementAnchorCustomData;
273
- _HTMLElementAnchorCustomData_create = new WeakMap(), _HTMLElementAnchorCustomData_update = new WeakMap();
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _HTMLElementAnchorData_viewerHtmlElement, _HTMLElementAnchorData_data, _HTMLElementAnchorData_format, _HTMLElementAnchorData_hideable, _HTMLElementAnchorData_intersectionTarget, _HTMLElementAnchorData_location, _HTMLElementAnchorData_viewports, _HTMLElementAnchorCustomData_create, _HTMLElementAnchorCustomData_update;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.HTMLElementAnchorCustomData = exports.HTMLElementAnchorImageData = exports.HTMLElementAnchorTextData = exports.HTMLElementAnchorData = void 0;
16
+ const AbstractTreeNodeData_1 = require("../AbstractTreeNodeData");
17
+ class HTMLElementAnchorData extends AbstractTreeNodeData_1.AbstractTreeNodeData {
18
+ // #endregion Properties (9)
19
+ // #region Constructors (1)
20
+ /**
21
+ * Creates a custom data node.
22
+ *
23
+ * @param _data the data as key- value pairs
24
+ * @param id the id
25
+ */
26
+ constructor(properties) {
27
+ super(properties.id, properties.version);
28
+ _HTMLElementAnchorData_viewerHtmlElement.set(this, {});
29
+ _HTMLElementAnchorData_data.set(this, void 0);
30
+ _HTMLElementAnchorData_format.set(this, void 0);
31
+ _HTMLElementAnchorData_hideable.set(this, true);
32
+ _HTMLElementAnchorData_intersectionTarget.set(this, void 0);
33
+ _HTMLElementAnchorData_location.set(this, void 0);
34
+ _HTMLElementAnchorData_viewports.set(this, []);
35
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_location, properties.location, "f");
36
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_data, properties.data, "f");
37
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_format, properties.format, "f");
38
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_hideable, properties.hideable === undefined ? true : properties.hideable, "f");
39
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_viewports, properties.viewports || [], "f");
40
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_intersectionTarget, properties.intersectionTarget, "f");
41
+ this.internalHtmlElement = (document.createElement("div"));
42
+ this.internalHtmlElement.classList.add("sdv-anchor-inner-container");
43
+ }
44
+ // #endregion Constructors (1)
45
+ // #region Public Accessors (12)
46
+ get data() {
47
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_data, "f");
48
+ }
49
+ set data(value) {
50
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_data, value, "f");
51
+ }
52
+ get format() {
53
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_format, "f");
54
+ }
55
+ set format(value) {
56
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_format, value, "f");
57
+ }
58
+ get hideable() {
59
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_hideable, "f");
60
+ }
61
+ set hideable(value) {
62
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_hideable, value, "f");
63
+ }
64
+ get intersectionTarget() {
65
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_intersectionTarget, "f");
66
+ }
67
+ set intersectionTarget(value) {
68
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_intersectionTarget, value, "f");
69
+ }
70
+ get location() {
71
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_location, "f");
72
+ }
73
+ set location(value) {
74
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_location, value, "f");
75
+ }
76
+ get viewports() {
77
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewports, "f");
78
+ }
79
+ set viewports(value) {
80
+ __classPrivateFieldSet(this, _HTMLElementAnchorData_viewports, value, "f");
81
+ }
82
+ // #endregion Public Accessors (12)
83
+ // #region Public Methods (3)
84
+ createViewerHtmlElement(viewer) {
85
+ if (__classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer])
86
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer];
87
+ if (this.viewports.includes(viewer) || this.viewports.length === 0) {
88
+ __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer] = (this.internalHtmlElement.cloneNode(true));
89
+ this.create({
90
+ anchor: this,
91
+ parent: __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer],
92
+ });
93
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer];
94
+ }
95
+ return null;
96
+ }
97
+ getViewerHtmlElement(viewer) {
98
+ if (__classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer])
99
+ return __classPrivateFieldGet(this, _HTMLElementAnchorData_viewerHtmlElement, "f")[viewer];
100
+ return null;
101
+ }
102
+ update(properties) {
103
+ properties.htmlElement.style.display = "";
104
+ if ((this.hideable && properties.hidden) ||
105
+ properties.visible === false)
106
+ properties.htmlElement.style.display = "none";
107
+ let x, y;
108
+ if (this.data.position && this.data.position.horizontal === "right") {
109
+ x = properties.container[0] - properties.htmlElement.offsetWidth;
110
+ }
111
+ else if (this.data.position &&
112
+ this.data.position.horizontal === "left") {
113
+ x = properties.container[0];
114
+ }
115
+ else {
116
+ x =
117
+ properties.container[0] -
118
+ properties.htmlElement.offsetWidth / 2;
119
+ }
120
+ if (this.data.position && this.data.position.vertical === "bottom") {
121
+ y = properties.container[1] - properties.htmlElement.offsetHeight;
122
+ }
123
+ else if (this.data.position &&
124
+ this.data.position.vertical === "top") {
125
+ y = properties.container[1];
126
+ }
127
+ else {
128
+ y =
129
+ properties.container[1] -
130
+ properties.htmlElement.offsetHeight / 2;
131
+ }
132
+ x = x / properties.scale[0];
133
+ y = y / properties.scale[1];
134
+ properties.htmlElement.style.left = x + "px";
135
+ properties.htmlElement.style.top = y + "px";
136
+ }
137
+ }
138
+ exports.HTMLElementAnchorData = HTMLElementAnchorData;
139
+ _HTMLElementAnchorData_viewerHtmlElement = new WeakMap(), _HTMLElementAnchorData_data = new WeakMap(), _HTMLElementAnchorData_format = new WeakMap(), _HTMLElementAnchorData_hideable = new WeakMap(), _HTMLElementAnchorData_intersectionTarget = new WeakMap(), _HTMLElementAnchorData_location = new WeakMap(), _HTMLElementAnchorData_viewports = new WeakMap();
140
+ class HTMLElementAnchorTextData extends HTMLElementAnchorData {
141
+ // #region Constructors (1)
142
+ constructor(properties) {
143
+ super({
144
+ location: properties.location,
145
+ data: properties.data,
146
+ format: "text",
147
+ hideable: properties.hideable,
148
+ viewports: properties.viewports,
149
+ intersectionTarget: properties.intersectionTarget,
150
+ id: properties.id,
151
+ version: properties.version,
152
+ });
153
+ }
154
+ // #endregion Constructors (1)
155
+ // #region Public Methods (1)
156
+ clone() {
157
+ return new HTMLElementAnchorTextData({
158
+ location: this.location,
159
+ data: this.data,
160
+ hideable: this.hideable,
161
+ viewports: this.viewports,
162
+ intersectionTarget: this.intersectionTarget,
163
+ id: this.id,
164
+ version: this.version,
165
+ });
166
+ }
167
+ // #endregion Public Methods (1)
168
+ // #region Private Methods (1)
169
+ create(properties) {
170
+ var _a;
171
+ const span = document.createElement("span");
172
+ span.classList.add("sdv-anchor-text");
173
+ span.style.color = (_a = properties.anchor.data.color) === null || _a === void 0 ? void 0 : _a.toString();
174
+ span.textContent = properties.anchor.data.text;
175
+ properties.parent.appendChild(span);
176
+ if (properties.anchor.data.textAlign &&
177
+ (properties.anchor.data.textAlign === "right" ||
178
+ properties.anchor.data.textAlign === "center")) {
179
+ span.style.textAlign = properties.anchor.data.textAlign;
180
+ }
181
+ else {
182
+ span.style.textAlign = "left";
183
+ }
184
+ }
185
+ }
186
+ exports.HTMLElementAnchorTextData = HTMLElementAnchorTextData;
187
+ class HTMLElementAnchorImageData extends HTMLElementAnchorData {
188
+ // #region Constructors (1)
189
+ constructor(properties) {
190
+ super({
191
+ location: properties.location,
192
+ data: properties.data,
193
+ format: "image",
194
+ hideable: properties.hideable,
195
+ viewports: properties.viewports,
196
+ intersectionTarget: properties.intersectionTarget,
197
+ id: properties.id,
198
+ version: properties.version,
199
+ });
200
+ }
201
+ // #endregion Constructors (1)
202
+ // #region Public Methods (1)
203
+ clone() {
204
+ return new HTMLElementAnchorImageData({
205
+ location: this.location,
206
+ data: this.data,
207
+ hideable: this.hideable,
208
+ viewports: this.viewports,
209
+ intersectionTarget: this.intersectionTarget,
210
+ id: this.id,
211
+ version: this.version,
212
+ });
213
+ }
214
+ // #endregion Public Methods (1)
215
+ // #region Private Methods (1)
216
+ create(properties) {
217
+ const img = document.createElement("img");
218
+ img.classList.add("sdv-anchor-image");
219
+ properties.parent.appendChild(img);
220
+ img.src = properties.anchor.data.src;
221
+ if (properties.anchor.data.height)
222
+ img.height = properties.anchor.data.height;
223
+ if (properties.anchor.data.width)
224
+ img.width = properties.anchor.data.width;
225
+ if (properties.anchor.data.alt)
226
+ img.alt = properties.anchor.data.alt;
227
+ }
228
+ }
229
+ exports.HTMLElementAnchorImageData = HTMLElementAnchorImageData;
230
+ class HTMLElementAnchorCustomData extends HTMLElementAnchorData {
231
+ // #endregion Properties (1)
232
+ // #region Constructors (1)
233
+ constructor(properties) {
234
+ super({
235
+ location: properties.location,
236
+ data: properties.data,
237
+ format: "custom",
238
+ hideable: properties.hideable,
239
+ viewports: properties.viewports,
240
+ intersectionTarget: properties.intersectionTarget,
241
+ id: properties.id,
242
+ version: properties.version,
243
+ });
244
+ // #region Properties (1)
245
+ _HTMLElementAnchorCustomData_create.set(this, void 0);
246
+ _HTMLElementAnchorCustomData_update.set(this, void 0);
247
+ __classPrivateFieldSet(this, _HTMLElementAnchorCustomData_create, properties.create, "f");
248
+ __classPrivateFieldSet(this, _HTMLElementAnchorCustomData_update, properties.update, "f");
249
+ }
250
+ // #endregion Constructors (1)
251
+ create(properties) {
252
+ __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_create, "f").call(this, properties);
253
+ }
254
+ update(properties) {
255
+ __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_update, "f").call(this, properties);
256
+ }
257
+ // #region Public Methods (1)
258
+ clone() {
259
+ return new HTMLElementAnchorCustomData({
260
+ location: this.location,
261
+ data: this.data,
262
+ hideable: this.hideable,
263
+ viewports: this.viewports,
264
+ intersectionTarget: this.intersectionTarget,
265
+ id: this.id,
266
+ version: this.version,
267
+ create: __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_create, "f"),
268
+ update: __classPrivateFieldGet(this, _HTMLElementAnchorCustomData_update, "f"),
269
+ });
270
+ }
271
+ }
272
+ exports.HTMLElementAnchorCustomData = HTMLElementAnchorCustomData;
273
+ _HTMLElementAnchorCustomData_create = new WeakMap(), _HTMLElementAnchorCustomData_update = new WeakMap();
274
274
  //# sourceMappingURL=HTMLElementAnchorData.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HTMLElementAnchorData.js","sourceRoot":"","sources":["../../../src/implementation/data/HTMLElementAnchorData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAQA,kEAA6D;AAE7D,MAAsB,qBACrB,SAAQ,2CAAoB;IAiB5B,4BAA4B;IAE5B,2BAA2B;IAE3B;;;;;OAKG;IACH,YAAY,UASX;QACA,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QA/B1C,mDAEI,EAAE,EAAC;QAEP,8CAAgD;QAChD,gDAAqC;QACrC,0CAAqB,IAAI,EAAC;QAC1B,4DAA8C;QAC9C,kDAAgB;QAChB,2CAAuB,EAAE,EAAC;QAwBzB,uBAAA,IAAI,mCAAa,UAAU,CAAC,QAAQ,MAAA,CAAC;QACrC,uBAAA,IAAI,+BAAS,UAAU,CAAC,IAAI,MAAA,CAAC;QAC7B,uBAAA,IAAI,iCAAW,UAAU,CAAC,MAAM,MAAA,CAAC;QACjC,uBAAA,IAAI,mCACH,UAAU,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,MAAA,CAAC;QAChE,uBAAA,IAAI,oCAAc,UAAU,CAAC,SAAS,IAAI,EAAE,MAAA,CAAC;QAC7C,uBAAA,IAAI,6CAAuB,UAAU,CAAC,kBAAkB,MAAA,CAAC;QAEzD,IAAI,CAAC,mBAAmB,GAAmB,CAC1C,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAC7B,CAAC;QACF,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IACtE,CAAC;IAED,8BAA8B;IAE9B,gCAAgC;IAEhC,IAAW,IAAI;QACd,OAAO,uBAAA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MAAM,MAAA,CAAC;IAClC,CAAC;IAED,8BAA8B;IAEvB,MAAM,CAAC,UAGb;QACA,uBAAA,IAAI,2CAAQ,MAAZ,IAAI,EAAS,UAAU,CAAC,CAAC;IAC1B,CAAC;IAEM,MAAM,CAAC,UAA8C;QAC3D,uBAAA,IAAI,2CAAQ,MAAZ,IAAI,EAAS,UAAU,CAAC,CAAC;IAC1B,CAAC;IAED,6BAA6B;IAEtB,KAAK;QACX,OAAO,IAAI,2BAA2B,CAAC;YACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,kBAAkB,EAAE,IAAI,CAAC,kBAAkB;YAC3C,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,uBAAA,IAAI,2CAAQ;YACpB,MAAM,EAAE,uBAAA,IAAI,2CAAQ;SACpB,CAAC,CAAC;IACJ,CAAC;CAGD;AAxED,kEAwEC"}
@@ -1,22 +1,22 @@
1
- import { Color, IInstanceData } from "@shapediver/viewer.shared.types";
2
- import { mat4 } from "gl-matrix";
3
- import { AbstractTreeNodeData } from "../AbstractTreeNodeData";
4
- export declare class InstanceData extends AbstractTreeNodeData implements IInstanceData {
5
- #private;
6
- /**
7
- * Creates a instanceMatrices data node.
8
- *
9
- * @param _data the data as key- value pairs
10
- * @param id the id
11
- */
12
- constructor(instanceMatrices?: mat4[], instanceColors?: Color[], id?: string, version?: string);
13
- get instanceColors(): Color[];
14
- set instanceColors(value: Color[]);
15
- get instanceMatrices(): mat4[];
16
- set instanceMatrices(value: mat4[]);
17
- /**
18
- * Clones the scene graph data.
19
- */
20
- clone(): IInstanceData;
21
- }
1
+ import { Color, IInstanceData } from "@shapediver/viewer.shared.types";
2
+ import { mat4 } from "gl-matrix";
3
+ import { AbstractTreeNodeData } from "../AbstractTreeNodeData";
4
+ export declare class InstanceData extends AbstractTreeNodeData implements IInstanceData {
5
+ #private;
6
+ /**
7
+ * Creates a instanceMatrices data node.
8
+ *
9
+ * @param _data the data as key- value pairs
10
+ * @param id the id
11
+ */
12
+ constructor(instanceMatrices?: mat4[], instanceColors?: Color[], id?: string, version?: string);
13
+ get instanceColors(): Color[];
14
+ set instanceColors(value: Color[]);
15
+ get instanceMatrices(): mat4[];
16
+ set instanceMatrices(value: mat4[]);
17
+ /**
18
+ * Clones the scene graph data.
19
+ */
20
+ clone(): IInstanceData;
21
+ }
22
22
  //# sourceMappingURL=InstanceData.d.ts.map