@crystaldesign/web-planner-logic 24.10.0-beta.2 → 24.10.0-beta.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.
Files changed (97) hide show
  1. package/build/cjs/{DivaBoxPlanner-6a883291.js → DivaBoxPlanner-f5288507.js} +16 -18
  2. package/build/cjs/{DivaStandardPlanner-a18f752d.js → DivaStandardPlanner-e910ac72.js} +26 -30
  3. package/build/cjs/{DoorPlanner-5164c50d.js → DoorPlanner-3c76f0cf.js} +1 -1
  4. package/build/cjs/{Host3DSignalR-f13134cb.js → Host3DSignalR-1e376e3f.js} +1 -6
  5. package/build/cjs/{LiviqueWWSHandler-32bb295f.js → LiviqueWWSHandler-248f4aa6.js} +1 -1
  6. package/build/cjs/{PfisterWWSHandler-0447de84.js → PfisterWWSHandler-a28671cf.js} +1 -1
  7. package/build/cjs/{PlannerHandler2D-a941c306.js → PlannerHandler2D-085a6eb4.js} +1249 -10
  8. package/build/cjs/{ProductBasketHandler-144386d9.js → ProductBasketHandler-fb47032b.js} +1 -1
  9. package/build/cjs/{SeriousBasketHandler-e7f5bfb9.js → SeriousBasketHandler-768b44df.js} +1 -1
  10. package/build/cjs/{ShelfPlanner-63df1fef.js → ShelfPlanner-6d8d7580.js} +6 -6
  11. package/build/cjs/{StandardWWSHandler-96b3ab81.js → StandardWWSHandler-196a78e7.js} +1 -1
  12. package/build/cjs/{index-0cf8efc1.js → index-3703fcc3.js} +1367 -1799
  13. package/build/cjs/index.js +1 -1
  14. package/build/esm/{DivaBoxPlanner-0a38d41b.js → DivaBoxPlanner-4c8eb4d1.js} +5 -7
  15. package/build/esm/{DivaStandardPlanner-774854f1.js → DivaStandardPlanner-bff9587a.js} +5 -9
  16. package/build/esm/{DoorPlanner-c9293a3a.js → DoorPlanner-715224ea.js} +1 -1
  17. package/build/esm/{Host3DSignalR-3ca1dd9c.js → Host3DSignalR-69dbf5aa.js} +1 -6
  18. package/build/esm/{LiviqueWWSHandler-28edc334.js → LiviqueWWSHandler-f0ff1337.js} +1 -1
  19. package/build/esm/{PfisterWWSHandler-21e4c2f3.js → PfisterWWSHandler-c869657f.js} +1 -1
  20. package/build/esm/{PlannerHandler2D-9f4f8efb.js → PlannerHandler2D-ba45ba21.js} +1245 -8
  21. package/build/esm/{ProductBasketHandler-fa0c1a9e.js → ProductBasketHandler-d5f9fa30.js} +1 -1
  22. package/build/esm/{SeriousBasketHandler-2e0ab157.js → SeriousBasketHandler-9fdcebc2.js} +1 -1
  23. package/build/esm/{ShelfPlanner-c52e6233.js → ShelfPlanner-e5c01f8b.js} +6 -6
  24. package/build/esm/{StandardWWSHandler-72ea1ffc.js → StandardWWSHandler-72cb836f.js} +1 -1
  25. package/build/esm/{index-622ebf68.js → index-98a31597.js} +1367 -1799
  26. package/build/esm/index.js +1 -1
  27. package/build/types/web-planner-logic/src/index.d.ts +1 -0
  28. package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
  29. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts +7 -7
  30. package/build/types/web-planner-logic/src/interface/API/TemplateConfigType.d.ts.map +1 -1
  31. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts +2 -5
  32. package/build/types/web-planner-logic/src/interface/API/ViewConfigDataType.d.ts.map +1 -1
  33. package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +2 -2
  34. package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -3
  35. package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
  36. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts +44 -14
  37. package/build/types/web-planner-logic/src/interface/CoreTypes/index.d.ts.map +1 -1
  38. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts +1 -1
  39. package/build/types/web-planner-logic/src/interface/FunctionTypes/index.d.ts.map +1 -1
  40. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +0 -1
  41. package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
  42. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +1 -2
  43. package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +1 -1
  44. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +1 -3
  45. package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +1 -1
  46. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts +3 -2
  47. package/build/types/web-planner-logic/src/interface/ShelfPlanner/plannerData.d.ts.map +1 -1
  48. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +0 -1
  49. package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
  50. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +2 -3
  51. package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
  52. package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
  53. package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
  54. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts +3 -2
  55. package/build/types/web-planner-logic/src/logic/ConfigTree/Shelfplanner/ShelfPlannerGrid.d.ts.map +1 -1
  56. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts +4 -4
  57. package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
  58. package/build/types/web-planner-logic/src/logic/DivaCatalogHandler.d.ts.map +1 -1
  59. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +1 -12
  60. package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
  61. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +1 -2
  62. package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
  63. package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
  64. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +1 -2
  65. package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
  66. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts +0 -1
  67. package/build/types/web-planner-logic/src/logic/Planner/Rendering/DivaMediaServiceHandler.d.ts.map +1 -1
  68. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts +0 -1
  69. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Host3DSignalR.d.ts.map +1 -1
  70. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts +0 -17
  71. package/build/types/web-planner-logic/src/logic/Planner/Rendering/PlannerHandler3D.d.ts.map +1 -1
  72. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts +0 -9
  73. package/build/types/web-planner-logic/src/logic/Planner/Rendering/RenderSettings.d.ts.map +1 -1
  74. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts +0 -13
  75. package/build/types/web-planner-logic/src/logic/Planner/Rendering/Rendering.d.ts.map +1 -1
  76. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts +0 -3
  77. package/build/types/web-planner-logic/src/logic/Planner/Rendering/types.d.ts.map +1 -1
  78. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +2 -3
  79. package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
  80. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +0 -6
  81. package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
  82. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts +1 -1
  83. package/build/types/web-planner-logic/src/logic/Set/FavoritesHandler.d.ts.map +1 -1
  84. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts +1 -0
  85. package/build/types/web-planner-logic/src/model/DivaCatalogData.d.ts.map +1 -1
  86. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +0 -1
  87. package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
  88. package/build/types/web-planner-logic/src/model/Options/CatalogOptionData.d.ts.map +1 -1
  89. package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
  90. package/build/types/web-planner-logic/src/test/scripts/productHandlerMoc.d.ts.map +1 -1
  91. package/package.json +2 -2
  92. package/build/cjs/DivaSingleProductPlanner-fcf3e4be.js +0 -1169
  93. package/build/cjs/DockingPointHandler-5c6b6024.js +0 -1255
  94. package/build/esm/DivaSingleProductPlanner-76dcd48c.js +0 -1158
  95. package/build/esm/DockingPointHandler-c35c0ee3.js +0 -1245
  96. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts +0 -140
  97. package/build/types/web-planner-logic/src/logic/Planner/DivaSingleProductPlanner.d.ts.map +0 -1
@@ -1,16 +1,806 @@
1
- import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
2
1
  import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
2
  import _createClass from '@babel/runtime/helpers/createClass';
4
3
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
+ import { V as Vector3, c as Vector2, D as DockingPoint } from './index-98a31597.js';
5
+ import DivaUtils, { md5, DivaError } from '@crystaldesign/diva-utils';
6
+ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
5
7
  import _regeneratorRuntime from '@babel/runtime/regenerator';
6
- import { c as Vector2 } from './index-622ebf68.js';
7
8
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
8
9
  import { fabric } from 'fabric';
9
- import DivaUtils, { DivaError } from '@crystaldesign/diva-utils';
10
10
  import serialize from 'w3c-xmlserializer';
11
- import { d as dockingPointHandlerInst } from './DockingPointHandler-c35c0ee3.js';
12
11
 
13
- var LOG$1 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
12
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
+ var PlannerElementData = /*#__PURE__*/function () {
15
+ function PlannerElementData(setId, basketId, _elementId, plannerType) {
16
+ _classCallCheck(this, PlannerElementData);
17
+ _defineProperty(this, "planElement", void 0);
18
+ _defineProperty(this, "plannerStateHash", void 0);
19
+ //this value saves the state of the plannerData - used to check if plannerData state changed
20
+ // private dockingPoints: Map<string, DockingPoint[]>; //This map saves all docking Points accessioated to a type
21
+ _defineProperty(this, "dockingPoints", void 0);
22
+ //This map saves all docking Points accessioated to a type
23
+ _defineProperty(this, "tempDockingPoints", void 0);
24
+ //When reloading the element this array saves the previous docking points for redocking
25
+ _defineProperty(this, "plannerType", void 0);
26
+ _defineProperty(this, "basketId", void 0);
27
+ _defineProperty(this, "doSetWidthFromSVG", void 0);
28
+ _defineProperty(this, "doSetDepthFromSVG", void 0);
29
+ this.basketId = basketId;
30
+ this.planElement = {
31
+ elementId: _elementId,
32
+ setId: setId,
33
+ worldPosCenter: new Vector3(0, 0, 0),
34
+ //welt Position der linken hinteren unteren Ecke des Elementes
35
+ rotDeg: 0,
36
+ posNr: -1,
37
+ setPosNr: -1
38
+ };
39
+ // this.dockingPoints = new Map<string, DockingPoint[]>();
40
+ this.dockingPoints = [];
41
+ this.tempDockingPoints = [];
42
+ this.plannerStateHash = '';
43
+ this.plannerType = plannerType;
44
+ this.doSetWidthFromSVG = false;
45
+ this.doSetDepthFromSVG = false;
46
+ }
47
+ return _createClass(PlannerElementData, [{
48
+ key: "destroy",
49
+ value: function destroy() {
50
+ this.planElement.svgShapeOLF2D = null;
51
+ this.planElement.svgShapeOLT2D = null;
52
+ this.planElement.svgAsHTMLCanvas = undefined;
53
+ this.dockingPoints = [];
54
+ this.tempDockingPoints = [];
55
+ }
56
+ }, {
57
+ key: "getTempDockingPoints",
58
+ value: function getTempDockingPoints() {
59
+ return this.tempDockingPoints;
60
+ }
61
+ }, {
62
+ key: "clearTempDockingPoints",
63
+ value: function clearTempDockingPoints() {
64
+ this.tempDockingPoints = [];
65
+ }
66
+ }, {
67
+ key: "getDockingPoints",
68
+ value: function getDockingPoints() {
69
+ return this.dockingPoints;
70
+ }
71
+
72
+ /**
73
+ * This function returns true if any docking Point of the type is docking. For example, the type is AVL. if no AVL is docking - return false. If at least one AVL is docking - return true.
74
+ * @param type Type of the docking point
75
+ */
76
+ }, {
77
+ key: "dockingTypeIsDocking",
78
+ value: function dockingTypeIsDocking(type) {
79
+ var dockingPoints = this.getDockingPointsByType(type);
80
+ for (var i = 0; i < dockingPoints.length; i++) {
81
+ if (dockingPoints[i].IsDocking) return true;
82
+ }
83
+ return false;
84
+ }
85
+
86
+ /**
87
+ * This function returns all docking DPs of a specific type.
88
+ * @param type The type of the docking Point , e.g. AVL
89
+ */
90
+ }, {
91
+ key: "getDockingDockingPointsByType",
92
+ value: function getDockingDockingPointsByType(type) {
93
+ var dockingPoints = this.getDockingPointsByType(type);
94
+ var ret = [];
95
+ for (var i = 0; i < dockingPoints.length; i++) {
96
+ if (dockingPoints[i].IsDocking) ret.push(dockingPoints[i]);
97
+ }
98
+ return ret;
99
+ }
100
+
101
+ /**
102
+ * This function returns all docking DPs of any type.
103
+ */
104
+ }, {
105
+ key: "getDockingDockingPoints",
106
+ value: function getDockingDockingPoints() {
107
+ var ret = [];
108
+ for (var i = 0; i < this.dockingPoints.length; i++) {
109
+ if (this.dockingPoints[i].IsDocking) ret.push(this.dockingPoints[i]);
110
+ }
111
+ return ret;
112
+ }
113
+
114
+ /**
115
+ * This function returns all notDocking DPs of a specific type.
116
+ * @param type The type of the docking Point , e.g. AVL
117
+ */
118
+ }, {
119
+ key: "getFreeDockingPointsByType",
120
+ value: function getFreeDockingPointsByType(type) {
121
+ var dockingPoints = this.getDockingPointsByType(type);
122
+ var ret = [];
123
+ for (var i = 0; i < dockingPoints.length; i++) {
124
+ if (!dockingPoints[i].IsDocking) ret.push(dockingPoints[i]);
125
+ }
126
+ return ret;
127
+ }
128
+
129
+ /**
130
+ * This function returns the free docking with the specific type and number
131
+ * @param type
132
+ * @param number
133
+ */
134
+ }, {
135
+ key: "getFreeDockingPointByTypeAndNumber",
136
+ value: function getFreeDockingPointByTypeAndNumber(type, number) {
137
+ for (var i = 0; i < this.dockingPoints.length; i++) {
138
+ if (!this.dockingPoints[i].IsDocking && this.dockingPoints[i].Type == type && this.dockingPoints[i].Number == number) return this.dockingPoints[i];
139
+ }
140
+ return undefined;
141
+ }
142
+
143
+ /**
144
+ * This function returns all docking points of the element. It returns docking and not docking points with any type.
145
+ */
146
+ }, {
147
+ key: "getAllDockingPoints",
148
+ value: function getAllDockingPoints() {
149
+ return this.dockingPoints;
150
+ }
151
+ }, {
152
+ key: "getDockingPointsByType",
153
+ value: function getDockingPointsByType(type) {
154
+ var dps = [];
155
+ for (var i = 0; i < this.dockingPoints.length; i++) {
156
+ if (this.dockingPoints[i].Type == type) {
157
+ dps.push(this.dockingPoints[i]);
158
+ }
159
+ }
160
+ return dps;
161
+ }
162
+ }, {
163
+ key: "getDockingPointById",
164
+ value: function getDockingPointById(id) {
165
+ for (var i = 0; i < this.dockingPoints.length; i++) {
166
+ if (this.dockingPoints[i].DpId == id) {
167
+ return this.dockingPoints[i];
168
+ }
169
+ }
170
+ return undefined;
171
+ }
172
+ /**
173
+ * This function retuns the DockingPoint info in a string format that is used for the 3D image rendering planningData.
174
+ */
175
+ }, {
176
+ key: "getDockingPointJS3D",
177
+ value: function getDockingPointJS3D() {
178
+ var dpJS = '';
179
+ for (var i = 0; i < this.dockingPoints.length; i++) {
180
+ var dockingPoint = this.dockingPoints[i];
181
+ if (dockingPoint.IsDocking) {
182
+ if (dpJS != '') dpJS += ',';
183
+ dpJS += dockingPoint.Name + ':' + 'E' + dockingPoint.OnElementId;
184
+ }
185
+ }
186
+ return dpJS;
187
+ }
188
+ }, {
189
+ key: "ArticleCodex",
190
+ get: function get() {
191
+ var _this$planElement$pla, _this$planElement$pla2;
192
+ return (_this$planElement$pla = this.planElement.plannerData) !== null && _this$planElement$pla !== void 0 && _this$planElement$pla.articleCodex ? (_this$planElement$pla2 = this.planElement.plannerData) === null || _this$planElement$pla2 === void 0 ? void 0 : _this$planElement$pla2.articleCodex : '';
193
+ }
194
+ /**
195
+ * Returns true if the accessoire is docked to another element in the planner (relatedToBasketID is set).
196
+ */
197
+ }, {
198
+ key: "IsDockedAccessoire",
199
+ get: function get() {
200
+ return this.planElement.plannerData ? this.planElement.plannerData.isAccessoire : false;
201
+ }
202
+
203
+ //this.planElement.plannerData && this.planElement.plannerData.isAccessoire -> Becomes true if the accessoire is placed in the planner and docked to an element - this must not be true when loading the accessoire for the first time
204
+ //this.planElement.plannerData?.filterType == "Accessoire" -> This is always true - The Accesssoire article is listed as accessoire
205
+ }, {
206
+ key: "IsAccessoire",
207
+ get: function get() {
208
+ var _this$planElement$pla3;
209
+ return ((_this$planElement$pla3 = this.planElement.plannerData) === null || _this$planElement$pla3 === void 0 ? void 0 : _this$planElement$pla3.filterType) == 'Accessoire';
210
+ }
211
+ }, {
212
+ key: "FilterAVL",
213
+ get: function get() {
214
+ return this.getFilterAVL();
215
+ }
216
+ }, {
217
+ key: "FilterAVR",
218
+ get: function get() {
219
+ return this.getFilterAVR();
220
+ }
221
+ }, {
222
+ key: "PosNr",
223
+ get: function get() {
224
+ return this.planElement.posNr;
225
+ },
226
+ set: function set(posNr) {
227
+ this.planElement.posNr = posNr;
228
+ }
229
+ }, {
230
+ key: "SetPosNr",
231
+ set: function set(setPosNr) {
232
+ this.planElement.setPosNr = setPosNr;
233
+ }
234
+ }, {
235
+ key: "AccessoirePosNr",
236
+ get: function get() {
237
+ return this.planElement.posNrAcc != undefined ? this.planElement.posNrAcc : -1;
238
+ },
239
+ set: function set(posNr) {
240
+ this.planElement.posNrAcc = posNr;
241
+ }
242
+ }, {
243
+ key: "WorldPosCenter",
244
+ get: function get() {
245
+ return this.planElement.worldPosCenter;
246
+ }
247
+
248
+ /**
249
+ * This function returns the world pos of the top left bottom corner.
250
+ */,
251
+ set: function set(pos) {
252
+ this.planElement.worldPosCenter = pos;
253
+ }
254
+ }, {
255
+ key: "WorldPosCorner",
256
+ get: function get() {
257
+ if (this.planElement.plannerData == null) return new Vector3(0, 0, 0);
258
+ var cornerDir = new Vector2(-this.planElement.plannerData.width / 2, -this.planElement.plannerData.depth / 2);
259
+ cornerDir = Vector2.rotateOrigin(cornerDir, this.planElement.rotDeg);
260
+ return new Vector3(this.planElement.worldPosCenter.x + cornerDir.x, this.planElement.worldPosCenter.y - this.planElement.plannerData.height / 2, this.planElement.worldPosCenter.z + cornerDir.y);
261
+ },
262
+ set: function set(cornerPos) {
263
+ if (!this.planElement.plannerData) return;
264
+ var centerDir = new Vector2(this.planElement.plannerData.width / 2, this.planElement.plannerData.depth / 2);
265
+ centerDir = Vector2.rotateOrigin(centerDir, this.planElement.rotDeg);
266
+ this.planElement.worldPosCenter = new Vector3(cornerPos.x + centerDir.x, cornerPos.y + this.planElement.plannerData.height / 2, cornerPos.z + centerDir.y);
267
+ }
268
+
269
+ /**
270
+ * This function updates the world position and rotation of the element based of some delta Elements
271
+ * @param deltaMove delta translation in cm
272
+ * @param deltaRotDeg delta rotation in degrees
273
+ * @param rotCorrection Specifies the degrees the rotation is corrected. For Example if rotCorrection is 5 degrees and the final angle is between 20 and 25: Then the final angle is rounded to the nearest angle
274
+ */
275
+ }, {
276
+ key: "updateDeltaTrans",
277
+ value: function updateDeltaTrans(deltaMove, deltaRotDeg, rotCorrection, correctAngle) {
278
+ this.WorldPosCenter = new Vector3(this.WorldPosCenter.x + deltaMove.x, this.WorldPosCenter.y + deltaMove.y, this.WorldPosCenter.z + deltaMove.z);
279
+ if (deltaRotDeg != 0 || correctAngle) {
280
+ if (correctAngle) {
281
+ var newRot = this.RotDeg + deltaRotDeg;
282
+ if (rotCorrection != 0) {
283
+ if (Math.abs(newRot % rotCorrection) > rotCorrection / 2) {
284
+ deltaRotDeg = deltaRotDeg + rotCorrection - Math.abs(newRot % rotCorrection);
285
+ } else {
286
+ deltaRotDeg = deltaRotDeg + Math.abs(newRot % rotCorrection);
287
+ }
288
+ }
289
+ }
290
+ this.processCenterRot(deltaRotDeg);
291
+ }
292
+ }
293
+ }, {
294
+ key: "processCenterRot",
295
+ value: function processCenterRot(deltaRot) {
296
+ this.RotDeg = this.RotDeg + deltaRot;
297
+ }
298
+ /**
299
+ * Returns the position in world coordinates of the DP of the element depending on the position and rotation of the planner element
300
+ * @param dpID
301
+ */
302
+ }, {
303
+ key: "getWorldPosOfDP",
304
+ value: function getWorldPosOfDP(dpID) {
305
+ var dp = this.getDockingPointById(dpID);
306
+ if (dp == undefined) return new Vector3(0, 0, 0);
307
+ var rotatedDir = Vector2.rotateOrigin(new Vector2(dp === null || dp === void 0 ? void 0 : dp.LocalWorldPos.x, dp === null || dp === void 0 ? void 0 : dp.LocalWorldPos.z), this.RotDeg);
308
+ return new Vector3(this.WorldPosCorner.x + rotatedDir.x, this.WorldPosCorner.y, this.WorldPosCorner.z + rotatedDir.y);
309
+ }
310
+
311
+ /**
312
+ * Returns the outlines of the bounding box in world coordinates
313
+ */
314
+ }, {
315
+ key: "getWorld2DBBoxOutline",
316
+ value: function getWorld2DBBoxOutline() {
317
+ var bboxPoints = [];
318
+ bboxPoints.push(new Vector2(this.WorldPosCorner.x, this.WorldPosCorner.z));
319
+ var helper = Vector2.rotateOrigin(new Vector2(this.getGlobalWidth(), 0), this.RotDeg);
320
+ bboxPoints.push(new Vector2(this.WorldPosCorner.x + helper.x, this.WorldPosCorner.z + helper.y));
321
+ helper = Vector2.rotateOrigin(new Vector2(this.getGlobalWidth(), this.getGlobalDepth()), this.RotDeg);
322
+ bboxPoints.push(new Vector2(this.WorldPosCorner.x + helper.x, this.WorldPosCorner.z + helper.y));
323
+ helper = Vector2.rotateOrigin(new Vector2(0, this.getGlobalDepth()), this.RotDeg);
324
+ bboxPoints.push(new Vector2(this.WorldPosCorner.x + helper.x, this.WorldPosCorner.z + helper.y));
325
+ return bboxPoints;
326
+ }
327
+ }, {
328
+ key: "RotDeg",
329
+ get: function get() {
330
+ return this.planElement.rotDeg;
331
+ }
332
+
333
+ /**
334
+ * Saves the current docking point state
335
+ */,
336
+ set: function set(rot) {
337
+ this.planElement.rotDeg = rot;
338
+ }
339
+ }, {
340
+ key: "saveCurrentDPState",
341
+ value: function saveCurrentDPState() {
342
+ if (this.dockingPoints && this.dockingPoints.length > 0) {
343
+ this.tempDockingPoints = [];
344
+ for (var i = 0; i < this.dockingPoints.length; i++) {
345
+ this.tempDockingPoints.push(this.dockingPoints[i].clone());
346
+ }
347
+ }
348
+ }
349
+ }, {
350
+ key: "clearAllDockingPoints",
351
+ value: function clearAllDockingPoints() {
352
+ this.dockingPoints = [];
353
+ }
354
+ }, {
355
+ key: "addDockingPoint",
356
+ value: function addDockingPoint(dockingPoint) {
357
+ this.dockingPoints.push(dockingPoint);
358
+ }
359
+
360
+ //Sets the planner Data. Returns true if something changed -> Reload
361
+ }, {
362
+ key: "updatePlannerData",
363
+ value: function updatePlannerData(data) {
364
+ //The plannerData ist keine Kopie, sondern ein verweis - wenn im Konfigurator das PlannerData Object geändert wird, dann wird es das hier auch.
365
+ if ((data === null || data === void 0 ? void 0 : data.width) == undefined || data.width == -1) {
366
+ this.doSetWidthFromSVG = true;
367
+ } else {
368
+ this.doSetWidthFromSVG = false;
369
+ }
370
+ if ((data === null || data === void 0 ? void 0 : data.depth) == undefined || data.depth == -1) {
371
+ this.doSetDepthFromSVG = true;
372
+ } else {
373
+ this.doSetDepthFromSVG = false;
374
+ }
375
+ if (this.planElement.plannerData == null && data != null) {
376
+ this.planElement.plannerData = data;
377
+ this.plannerStateHash = md5(JSON.stringify(this.planElement.plannerData));
378
+ return true;
379
+ }
380
+ if (data != null) this.planElement.plannerData = data;
381
+ if (!this.planElement.plannerData) return false;
382
+ var plannerDataForCache = _objectSpread(_objectSpread({}, this.planElement.plannerData), {}, {
383
+ currentAccessorires: []
384
+ });
385
+ var currentHash = md5(JSON.stringify(plannerDataForCache));
386
+ if (this.plannerStateHash != currentHash) {
387
+ this.plannerStateHash = currentHash;
388
+ return true;
389
+ }
390
+ return false;
391
+ }
392
+ }, {
393
+ key: "cleanShapeOLF2D",
394
+ value: function cleanShapeOLF2D() {
395
+ this.planElement.svgShapeOLF2D = undefined;
396
+ }
397
+ }, {
398
+ key: "cleanShapeOLT2D",
399
+ value: function cleanShapeOLT2D() {
400
+ this.planElement.svgShapeOLT2D = undefined;
401
+ }
402
+ }, {
403
+ key: "DoSetWidthFromSVG",
404
+ get: function get() {
405
+ return this.doSetWidthFromSVG;
406
+ }
407
+ }, {
408
+ key: "DoSetDepthFromSVG",
409
+ get: function get() {
410
+ return this.doSetDepthFromSVG;
411
+ }
412
+ }, {
413
+ key: "WidthFromSVG",
414
+ set: function set(svgWidth) {
415
+ if (this.planElement.plannerData) this.planElement.plannerData.width = svgWidth;
416
+ this.doSetWidthFromSVG = false;
417
+ }
418
+ }, {
419
+ key: "DepthFromSVG",
420
+ set: function set(svgDepth) {
421
+ if (this.planElement.plannerData) this.planElement.plannerData.depth = svgDepth;
422
+ this.doSetDepthFromSVG = false;
423
+ }
424
+ }, {
425
+ key: "ElementId",
426
+ get: function get() {
427
+ return this.planElement.elementId;
428
+ }
429
+ }, {
430
+ key: "SvgFileName",
431
+ get: function get() {
432
+ var _this$planElement$pla4;
433
+ return (_this$planElement$pla4 = this.planElement.plannerData) === null || _this$planElement$pla4 === void 0 ? void 0 : _this$planElement$pla4.curSVG;
434
+ }
435
+ }, {
436
+ key: "Width",
437
+ get: function get() {
438
+ var _this$planElement$pla5;
439
+ return (_this$planElement$pla5 = this.planElement.plannerData) === null || _this$planElement$pla5 === void 0 ? void 0 : _this$planElement$pla5.width;
440
+ }
441
+ }, {
442
+ key: "Height",
443
+ get: function get() {
444
+ var _this$planElement$pla6;
445
+ return (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.height;
446
+ }
447
+ }, {
448
+ key: "Depth",
449
+ get: function get() {
450
+ var _this$planElement$pla7;
451
+ return (_this$planElement$pla7 = this.planElement.plannerData) === null || _this$planElement$pla7 === void 0 ? void 0 : _this$planElement$pla7.depth;
452
+ }
453
+ }, {
454
+ key: "HasAVL",
455
+ get: function get() {
456
+ var _this$planElement$pla8;
457
+ return (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.hasAVL;
458
+ }
459
+ }, {
460
+ key: "HasAVR",
461
+ get: function get() {
462
+ var _this$planElement$pla9;
463
+ return (_this$planElement$pla9 = this.planElement.plannerData) === null || _this$planElement$pla9 === void 0 ? void 0 : _this$planElement$pla9.hasAVR;
464
+ }
465
+ }, {
466
+ key: "HasAVO",
467
+ get: function get() {
468
+ return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVO > 0 ? true : false : false;
469
+ }
470
+ }, {
471
+ key: "HasAVU",
472
+ get: function get() {
473
+ return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVU > 0 ? true : false : false;
474
+ }
475
+ }, {
476
+ key: "HasAVC",
477
+ get: function get() {
478
+ return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVC > 0 ? true : false : false;
479
+ }
480
+ }, {
481
+ key: "SvgShapeOLF2D",
482
+ get: function get() {
483
+ return this.planElement.svgShapeOLF2D;
484
+ },
485
+ set: function set(shape) {
486
+ this.planElement.svgShapeOLF2D = shape;
487
+ }
488
+ }, {
489
+ key: "SvgShapeOLT2D",
490
+ get: function get() {
491
+ return this.planElement.svgShapeOLT2D;
492
+ },
493
+ set: function set(shape) {
494
+ this.planElement.svgShapeOLT2D = shape;
495
+ }
496
+ }, {
497
+ key: "OLTPolygon",
498
+ get: function get() {
499
+ return this.planElement.oltPolygon;
500
+ },
501
+ set: function set(polygon) {
502
+ this.planElement.oltPolygon = polygon;
503
+ }
504
+ }, {
505
+ key: "setupOLF",
506
+ value: function setupOLF(polygon, olfWidth, olfHeight) {
507
+ this.planElement.olfPolygon = polygon;
508
+ this.planElement.olfDepth = olfHeight;
509
+ this.planElement.olfWidth = olfWidth;
510
+ }
511
+ }, {
512
+ key: "clearOLF",
513
+ value: function clearOLF() {
514
+ this.planElement.olfPolygon = undefined;
515
+ this.planElement.olfDepth = undefined;
516
+ this.planElement.olfWidth = undefined;
517
+ }
518
+ }, {
519
+ key: "getGlobalWidth",
520
+ value: function getGlobalWidth() {
521
+ if (this.HasOLFPolygon) {
522
+ return this.planElement.olfWidth / DivaUtils.UnitRecalc;
523
+ }
524
+ return this.Width;
525
+ }
526
+ }, {
527
+ key: "getGlobalDepth",
528
+ value: function getGlobalDepth() {
529
+ if (this.HasOLFPolygon) {
530
+ return this.planElement.olfDepth / DivaUtils.UnitRecalc;
531
+ }
532
+ return this.Depth;
533
+ }
534
+ }, {
535
+ key: "HasOLTPolygon",
536
+ get: function get() {
537
+ return this.planElement.oltPolygon != null;
538
+ }
539
+ }, {
540
+ key: "HasOLFPolygon",
541
+ get: function get() {
542
+ return this.planElement.olfPolygon != null;
543
+ }
544
+ }, {
545
+ key: "getOLTPolygonWorldPos",
546
+ value: function getOLTPolygonWorldPos() {
547
+ if (!this.planElement.oltPolygon) return [];
548
+ var polygon = [];
549
+ for (var i = 0; i < this.planElement.oltPolygon.length; i++) {
550
+ var localWorldPos = new Vector2(this.planElement.oltPolygon[i].x / DivaUtils.UnitRecalc, this.planElement.oltPolygon[i].y / DivaUtils.UnitRecalc);
551
+ localWorldPos = Vector2.rotateOrigin(localWorldPos, this.RotDeg);
552
+ polygon.push(new Vector2(this.WorldPosCorner.x + localWorldPos.x, this.WorldPosCorner.z + localWorldPos.y));
553
+ }
554
+ return polygon;
555
+ }
556
+ }, {
557
+ key: "getOLFPolygonWorldPos",
558
+ value: function getOLFPolygonWorldPos() {
559
+ var polygon = [];
560
+ if (!this.planElement.olfPolygon) return [];
561
+ for (var i = 0; i < this.planElement.olfPolygon.length; i++) {
562
+ var localWorldPos = new Vector2(this.planElement.olfPolygon[i].x / DivaUtils.UnitRecalc, this.planElement.olfPolygon[i].y / DivaUtils.UnitRecalc);
563
+ localWorldPos = Vector2.rotateOrigin(localWorldPos, this.RotDeg);
564
+ polygon.push(new Vector2(this.WorldPosCorner.x + localWorldPos.x, this.WorldPosCorner.z + localWorldPos.y));
565
+ }
566
+ return polygon;
567
+ }
568
+ }, {
569
+ key: "SvgData",
570
+ get: function get() {
571
+ return this.planElement.svgData ? this.planElement.svgData : '';
572
+ },
573
+ set: function set(svgData) {
574
+ this.planElement.svgData = svgData;
575
+ }
576
+ }, {
577
+ key: "SvgDataOLTBase64",
578
+ set: function set(svgData) {
579
+ this.planElement.SvgDataOLTBase64 = svgData;
580
+ }
581
+ }, {
582
+ key: "Layer",
583
+ get: function get() {
584
+ return this.planElement.plannerData.layer;
585
+ }
586
+ }, {
587
+ key: "HasSvgAsHTMLCanvas",
588
+ get: function get() {
589
+ return this.planElement.svgAsHTMLCanvas == undefined ? false : true;
590
+ }
591
+ }, {
592
+ key: "SvgAsHTMLCanvas",
593
+ get: function get() {
594
+ return this.planElement.svgAsHTMLCanvas;
595
+ }
596
+
597
+ /** ---------------------------------Getter und setter for the view------------------------- */,
598
+ set: function set(ctx) {
599
+ this.planElement.svgAsHTMLCanvas = ctx;
600
+ }
601
+ }, {
602
+ key: "getPosNr",
603
+ value: function getPosNr() {
604
+ return this.planElement.setPosNr;
605
+ }
606
+ }, {
607
+ key: "getAccessoirePosNr",
608
+ value: function getAccessoirePosNr() {
609
+ return this.planElement.posNrAcc;
610
+ }
611
+ }, {
612
+ key: "getPosNrWithAccessoirePosNr",
613
+ value: function getPosNrWithAccessoirePosNr() {
614
+ return this.getIsDockedAccessoire() ? this.getPosNr() + '.' + (this.getAccessoirePosNr() != undefined && this.getAccessoirePosNr() < 10 ? '0' + this.getAccessoirePosNr() : this.getAccessoirePosNr()) : this.getPosNr().toString();
615
+ }
616
+ }, {
617
+ key: "getIsDockedAccessoire",
618
+ value: function getIsDockedAccessoire() {
619
+ return this.IsDockedAccessoire;
620
+ }
621
+ }, {
622
+ key: "getIsNotDockedAccessoire",
623
+ value: function getIsNotDockedAccessoire() {
624
+ var _this$planElement$pla10;
625
+ return !!((_this$planElement$pla10 = this.planElement.plannerData) !== null && _this$planElement$pla10 !== void 0 && _this$planElement$pla10.isNotDockedAccessoire);
626
+ }
627
+ }, {
628
+ key: "getParentElementId",
629
+ value: function getParentElementId() {
630
+ var _this$planElement$pla11;
631
+ return (_this$planElement$pla11 = this.planElement.plannerData) === null || _this$planElement$pla11 === void 0 ? void 0 : _this$planElement$pla11.parentElementId;
632
+ }
633
+ }, {
634
+ key: "getElementId",
635
+ value: function getElementId() {
636
+ return this.planElement.elementId;
637
+ }
638
+ }, {
639
+ key: "getBasketId",
640
+ value: function getBasketId() {
641
+ return this.basketId;
642
+ }
643
+ }, {
644
+ key: "getSetId",
645
+ value: function getSetId() {
646
+ return this.planElement.setId;
647
+ }
648
+ }, {
649
+ key: "getWorldPosCorner",
650
+ value: function getWorldPosCorner() {
651
+ return this.WorldPosCorner;
652
+ }
653
+
654
+ /**
655
+ * This function returns the position in world coordinates of the CENTER of the plannerElement
656
+ */
657
+ }, {
658
+ key: "getWorldPosCenter",
659
+ value: function getWorldPosCenter() {
660
+ return this.WorldPosCenter;
661
+ }
662
+ }, {
663
+ key: "getRotDeg",
664
+ value: function getRotDeg() {
665
+ return this.planElement.rotDeg;
666
+ }
667
+ }, {
668
+ key: "getRotRad",
669
+ value: function getRotRad() {
670
+ return this.planElement.rotDeg * Math.PI / 180;
671
+ }
672
+ }, {
673
+ key: "getHasAVL",
674
+ value: function getHasAVL() {
675
+ return this.planElement.plannerData ? this.planElement.plannerData.hasAVL : false;
676
+ }
677
+ }, {
678
+ key: "getHasAVR",
679
+ value: function getHasAVR() {
680
+ return this.planElement.plannerData ? this.planElement.plannerData.hasAVR : false;
681
+ }
682
+ }, {
683
+ key: "getHasAVO",
684
+ value: function getHasAVO() {
685
+ return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVO > 0 ? true : false : false;
686
+ }
687
+ }, {
688
+ key: "getHasAVU",
689
+ value: function getHasAVU() {
690
+ return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVU > 0 ? true : false : false;
691
+ }
692
+ }, {
693
+ key: "getHasAVC",
694
+ value: function getHasAVC() {
695
+ return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVC > 0 ? true : false : false;
696
+ }
697
+ }, {
698
+ key: "getFilterAVL",
699
+ value: function getFilterAVL() {
700
+ var _this$planElement$pla12;
701
+ return this.planElement.plannerData ? (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.AVLFilter : [];
702
+ }
703
+ }, {
704
+ key: "getFilterAVR",
705
+ value: function getFilterAVR() {
706
+ return this.planElement.plannerData ? this.planElement.plannerData.AVRFilter : [];
707
+ }
708
+ }, {
709
+ key: "getSVGShapeOLF2D",
710
+ value: function getSVGShapeOLF2D() {
711
+ return this.planElement.svgShapeOLF2D;
712
+ }
713
+ }, {
714
+ key: "getSVGShapeOLT2D",
715
+ value: function getSVGShapeOLT2D() {
716
+ return this.planElement.svgShapeOLT2D;
717
+ }
718
+ }, {
719
+ key: "getPlannerType",
720
+ value: function getPlannerType() {
721
+ return this.plannerType;
722
+ }
723
+
724
+ /**
725
+ * Returns the original svg XML
726
+ */
727
+ }, {
728
+ key: "getSVGData",
729
+ value: function getSVGData() {
730
+ return this.planElement.svgData ? this.planElement.svgData : '';
731
+ }
732
+ }, {
733
+ key: "getWidth",
734
+ value: function getWidth() {
735
+ return this.planElement.plannerData ? this.getGlobalWidth() : -1;
736
+ }
737
+ }, {
738
+ key: "getHeight",
739
+ value: function getHeight() {
740
+ return this.planElement.plannerData ? this.planElement.plannerData.height : -1;
741
+ }
742
+ }, {
743
+ key: "getDepth",
744
+ value: function getDepth() {
745
+ return this.planElement.plannerData ? this.getGlobalDepth() : -1;
746
+ }
747
+ }, {
748
+ key: "getDepthOLT",
749
+ value: function getDepthOLT() {
750
+ return this.Depth ? this.Depth : -1;
751
+ }
752
+ }, {
753
+ key: "getWidthOLT",
754
+ value: function getWidthOLT() {
755
+ return this.Width ? this.Width : -1;
756
+ }
757
+ }, {
758
+ key: "getLayer",
759
+ value: function getLayer() {
760
+ return this.planElement.plannerData ? this.planElement.plannerData.layer : 20;
761
+ }
762
+ }, {
763
+ key: "hasSvgAsHtmlCanvas",
764
+ value: function hasSvgAsHtmlCanvas() {
765
+ return this.planElement.svgAsHTMLCanvas == undefined ? false : true;
766
+ }
767
+ }, {
768
+ key: "getSvgAsHtmlCanvas",
769
+ value: function getSvgAsHtmlCanvas() {
770
+ return this.planElement.svgAsHTMLCanvas;
771
+ }
772
+ }, {
773
+ key: "hasSvgDataOLTBase64",
774
+ value: function hasSvgDataOLTBase64() {
775
+ return this.planElement.SvgDataOLTBase64 != undefined && this.planElement.SvgDataOLTBase64 != '';
776
+ }
777
+ }, {
778
+ key: "getSvgDataOLTBase64",
779
+ value: function getSvgDataOLTBase64() {
780
+ return this.planElement.SvgDataOLTBase64 != undefined ? this.planElement.SvgDataOLTBase64 : '';
781
+ }
782
+ }, {
783
+ key: "getAccessoires",
784
+ value: function getAccessoires() {
785
+ var _this$planElement$pla13;
786
+ return this.planElement.plannerData ? (_this$planElement$pla13 = this.planElement.plannerData) === null || _this$planElement$pla13 === void 0 ? void 0 : _this$planElement$pla13.accessoireList : [];
787
+ }
788
+ }, {
789
+ key: "getSVGsWithFormula",
790
+ value: function getSVGsWithFormula() {
791
+ var _this$planElement$pla14;
792
+ return (_this$planElement$pla14 = this.planElement.plannerData) === null || _this$planElement$pla14 === void 0 ? void 0 : _this$planElement$pla14.svgsWithFormula;
793
+ }
794
+ }, {
795
+ key: "getCurrentAccessorires",
796
+ value: function getCurrentAccessorires() {
797
+ var _this$planElement$pla15;
798
+ return this.planElement.plannerData ? (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.currentAccessorires : [];
799
+ }
800
+ }]);
801
+ }();
802
+
803
+ var LOG$2 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
14
804
  var SVGUtils = /*#__PURE__*/function () {
15
805
  function SVGUtils() {
16
806
  _classCallCheck(this, SVGUtils);
@@ -576,7 +1366,7 @@ var SVGUtils = /*#__PURE__*/function () {
576
1366
  }
577
1367
  }
578
1368
  function correctViewBoxScaleStyle(styleNode, scaleFactorSvgViewBox) {
579
- if (styleNode.getAttribute('type') != 'text/css') LOG$1.debug('Warnung komisches style Element bei diesem CSS.');
1369
+ if (styleNode.getAttribute('type') != 'text/css') LOG$2.debug('Warnung komisches style Element bei diesem CSS.');
580
1370
  var styleText = styleNode.innerHTML;
581
1371
  var styleParts = styleText.split('{');
582
1372
  var newStyleContent = '';
@@ -1346,7 +2136,7 @@ var SVGUtils = /*#__PURE__*/function () {
1346
2136
  deltaParameter = 4;
1347
2137
  break;
1348
2138
  default:
1349
- LOG$1.error(new DivaError('svg path command: ' + command + ' unknown'));
2139
+ LOG$2.error(new DivaError('svg path command: ' + command + ' unknown'));
1350
2140
  return;
1351
2141
  }
1352
2142
  for (var a = 0; a < number.length; a = a + deltaParameter) {
@@ -1475,6 +2265,453 @@ var SVGUtils = /*#__PURE__*/function () {
1475
2265
  }]);
1476
2266
  }();
1477
2267
 
2268
+ var LOG$1 = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
2269
+ /**
2270
+ * This class is used like a service.
2271
+ * It handles different actions on planner Elements and its docking Points
2272
+ */
2273
+ var DockingPointHandler = /*#__PURE__*/function () {
2274
+ function DockingPointHandler() {
2275
+ _classCallCheck(this, DockingPointHandler);
2276
+ }
2277
+ return _createClass(DockingPointHandler, [{
2278
+ key: "getRotOfDP",
2279
+ value:
2280
+ /**
2281
+ * This function returns the rotation of a vector that is specified by two positions in the 2 Dim Space
2282
+ * The rotation is 0 when the Vector is pointing downwards (pos1 is directly above pos2). The rotation is then computed clockwise
2283
+ * The result is resturned in degrees
2284
+ * @param pos1 2 Dimensional position
2285
+ * @param pos2 2 Dimensional position
2286
+ */
2287
+ function getRotOfDP(pos1, pos2) {
2288
+ var directionVec = Vector2.getDirection(pos2, pos1);
2289
+ var refDirection = new Vector2(0, 1);
2290
+ var smallAngle = Vector2.angleDeg(refDirection, directionVec);
2291
+ if (directionVec.x > 0) {
2292
+ return 360 - smallAngle;
2293
+ }
2294
+ return smallAngle;
2295
+ }
2296
+ }, {
2297
+ key: "getReferenceDPType",
2298
+ value: function getReferenceDPType(dpType) {
2299
+ switch (dpType) {
2300
+ case 'AVR':
2301
+ return 'AVL';
2302
+ case 'AVL':
2303
+ return 'AVR';
2304
+ case 'AVO':
2305
+ return 'AVU';
2306
+ case 'AVU':
2307
+ return 'AVO';
2308
+ case 'AVC':
2309
+ return 'AVC';
2310
+ }
2311
+ return '';
2312
+ }
2313
+ }, {
2314
+ key: "sortDockingPoints",
2315
+ value: function sortDockingPoints(dir, dockingPoints) {
2316
+ if (dir == 'LEFT_TO_RIGHT') return dockingPoints.sort(function (a, b) {
2317
+ return a.LocalWorldPos.x > b.LocalWorldPos.x ? 1 : -1;
2318
+ });else return dockingPoints.sort(function (a, b) {
2319
+ return a.LocalWorldPos.x < b.LocalWorldPos.x ? 1 : -1;
2320
+ });
2321
+ }
2322
+ /**
2323
+ * Check if the docking Points Filter match for the two elements.
2324
+ * @param plannerElement1
2325
+ * @param plannerElement2
2326
+ */
2327
+ }, {
2328
+ key: "checkDPAVLFilterDoMatch",
2329
+ value: function checkDPAVLFilterDoMatch(plannerElement1, plannerElement2) {
2330
+ var avrFilter1 = plannerElement1.FilterAVR;
2331
+ var avlFilter2 = plannerElement2.FilterAVL;
2332
+ if (avlFilter2.length == 0 && avrFilter1.length == 0) return true; //Diese überprüfung bin ich mir nicht sicher, dass es so passt.
2333
+
2334
+ for (var i = 0; i < avrFilter1.length; i++) {
2335
+ for (var j = 0; j < avlFilter2.length; j++) {
2336
+ if (avrFilter1[i] == avlFilter2[j]) {
2337
+ return true;
2338
+ }
2339
+ }
2340
+ }
2341
+ return false;
2342
+ }
2343
+ }, {
2344
+ key: "checkDPAVRFilterDoMatch",
2345
+ value: function checkDPAVRFilterDoMatch(plannerElement1, plannerElement2) {
2346
+ var avlFilter1 = plannerElement1.FilterAVL;
2347
+ var avrFilter2 = plannerElement2.FilterAVR;
2348
+ if (avlFilter1.length == 0 && avrFilter2.length == 0) return true; //Diese überprüfung bin ich mir nicht sicher, dass es so passt.
2349
+ for (var i = 0; i < avlFilter1.length; i++) {
2350
+ for (var j = 0; j < avrFilter2.length; j++) {
2351
+ if (avlFilter1[i] == avrFilter2[j]) {
2352
+ return true;
2353
+ }
2354
+ }
2355
+ }
2356
+ return false;
2357
+ }
2358
+
2359
+ /**
2360
+ * This function checks if two docking Points can be docked
2361
+ */
2362
+ }, {
2363
+ key: "checkDPsDoMatch",
2364
+ value: function checkDPsDoMatch(dp1, dp2, sourcePlannerElement, targetElement) {
2365
+ dp1.ElementId;
2366
+ var avrDockable = this.checkDPAVRFilterDoMatch(sourcePlannerElement, targetElement);
2367
+ var avlDockable = this.checkDPAVLFilterDoMatch(sourcePlannerElement, targetElement);
2368
+ var refDPType = this.getReferenceDPType(dp1.Type);
2369
+ if (refDPType == 'AVL' && !avlDockable) return false;
2370
+ if (refDPType == 'AVR' && !avrDockable) return false;
2371
+ if (dp2.Type != refDPType) return false;
2372
+ if (dp1.IsDocking || dp2.IsDocking) return false;
2373
+ if (!dp1.IgnoreLayer || !dp2.IgnoreLayer) {
2374
+ var doCheckLayer = true;
2375
+ if (dp1.PlannerConfig.ignoreLayerAVC && (dp1.Type == 'AVC' || dp2.Type == 'AVC')) {
2376
+ doCheckLayer = false;
2377
+ }
2378
+ if (dp1.PlannerConfig.ignoreLayerAVOAVU && (dp1.Type == 'AVO' || dp1.Type == 'AVU') && (dp2.Type == 'AVO' || dp2.Type == 'AVU')) {
2379
+ doCheckLayer = false;
2380
+ }
2381
+
2382
+ //Check layer
2383
+ if (doCheckLayer && dp2.Layer == dp1.Layer) return false;
2384
+ }
2385
+ if (dp1.HasNumber && dp2.HasNumber && dp1.Number != dp2.Number) return false;
2386
+ return true;
2387
+ }
2388
+
2389
+ /**
2390
+ * This function assumes that the two docking points are matching and can be docked
2391
+ * @param dp1
2392
+ * @param dp2
2393
+ */
2394
+ }, {
2395
+ key: "doDock",
2396
+ value: function doDock(dp1, dp2, elemId1, elemId2) {
2397
+ dp1.doDock(dp2, elemId2);
2398
+ dp2.doDock(dp1, elemId1);
2399
+ }
2400
+ /*
2401
+ This function inits all docking points of a planner Element Data. The information of the docking Points is currently loaded from the SVG Loader
2402
+ catalogCodex indicates the catalogCodex of the plannerElement
2403
+ */
2404
+ }, {
2405
+ key: "initDockingPointsFromSvg",
2406
+ value: function initDockingPointsFromSvg(plannerElement, dockingVectors, plannerconfig) {
2407
+ plannerElement.saveCurrentDPState();
2408
+ this.removeDockingPointRelations(plannerElement);
2409
+ plannerElement.clearAllDockingPoints();
2410
+ for (var i = 0; i < dockingVectors.length; i++) {
2411
+ var dockingVector = dockingVectors[i];
2412
+ var localWorldPos1 = new Vector2(dockingVector.x1 / DivaUtils.UnitRecalc, dockingVector.y1 / DivaUtils.UnitRecalc);
2413
+ var localWorldPos2 = new Vector2(dockingVector.x2 / DivaUtils.UnitRecalc, dockingVector.y2 / DivaUtils.UnitRecalc);
2414
+ var angle = this.getRotOfDP(localWorldPos1, localWorldPos2);
2415
+ var dockingfilter = undefined;
2416
+ if (dockingVector.dockingType == 'AVL') dockingfilter = plannerElement.getFilterAVL();else if (dockingVector.dockingType == 'AVR') dockingfilter = plannerElement.getFilterAVR();
2417
+ var dockingPoint = new DockingPoint(plannerElement.getElementId(), dockingVector.dockingType, dockingVector.dockingName, new Vector3(localWorldPos1.x, 0, localWorldPos1.y), angle, plannerElement.Layer, plannerconfig, dockingfilter);
2418
+ plannerElement.addDockingPoint(dockingPoint);
2419
+ }
2420
+ }
2421
+
2422
+ /**
2423
+ * This function removes all docking Point relations from the Element .
2424
+ * It removes them as well in the docked elements.
2425
+ * This function is used when deleting a plannerElement
2426
+ * @param plannerElement
2427
+ */
2428
+ }, {
2429
+ key: "removeDockingPointRelations",
2430
+ value: function removeDockingPointRelations(plannerElement) {
2431
+ var dockingPoints = plannerElement.getDockingPoints();
2432
+ for (var i = 0; i < dockingPoints.length; i++) {
2433
+ var dockingPoint = dockingPoints[i];
2434
+ if (dockingPoint.IsDocking) {
2435
+ var refDockingPoint = dockingPoint.OnDP;
2436
+ refDockingPoint.undock();
2437
+ dockingPoint.undock();
2438
+ }
2439
+ }
2440
+ }
2441
+ /**
2442
+ * This function removes all docking Point relations with the type from the Element .
2443
+ * It removes them as well in the docked elements.
2444
+ * This function is used when deleting a plannerElement
2445
+ * @param plannerElement
2446
+ * @param dpTypeList The Type of the docking Point like AVL or AVR
2447
+ */
2448
+ }, {
2449
+ key: "removeDockingPointRelationsByType",
2450
+ value: function removeDockingPointRelationsByType(plannerElement, dpTypeList) {
2451
+ var undockedFromElements = [];
2452
+ var dockingPoints = plannerElement.getDockingPoints();
2453
+ for (var i = 0; i < dockingPoints.length; i++) {
2454
+ var dockingPoint = dockingPoints[i];
2455
+ if (dpTypeList.indexOf(dockingPoint.Type) > -1 && dockingPoint.IsDocking) {
2456
+ var refDockingPoint = dockingPoint.OnDP;
2457
+ undockedFromElements.push(refDockingPoint.ElementId);
2458
+ refDockingPoint.undock();
2459
+ dockingPoint.undock();
2460
+ }
2461
+ }
2462
+ return undockedFromElements;
2463
+ }
2464
+ /**
2465
+ * This function returns a list of docking points that are dockable to the source Planner Element. The function only returns docking Points that lay within a specific area.
2466
+ *
2467
+ * @param sourceElement
2468
+ * @param targetElements
2469
+ * @param autoDockingDistance //gibt die distance an in der er automatisch snappen muss. Infinity _> Docke überall. 0 Docke nie
2470
+ * @returns saves dockable dockingpoints per type with the distance
2471
+ */
2472
+ }, {
2473
+ key: "searchDockableElementsInArea",
2474
+ value: function searchDockableElementsInArea(sourceElement, targetElements, autoDockingDistance // Wenn 0, dann dockt es immer
2475
+ ) {
2476
+ var sourceDPs = sourceElement.getAllDockingPoints();
2477
+ var dockableDPPairs = new Map(); //saves all dockable dockingpoints per type
2478
+ for (var i = 0; i < targetElements.length; i++) {
2479
+ var targetElement = targetElements[i];
2480
+ if (sourceElement.getElementId() == targetElement.getElementId()) continue;
2481
+ for (var di = 0; di < sourceDPs.length; di++) {
2482
+ var sourceDP = sourceDPs[di];
2483
+ var targetType = this.getReferenceDPType(sourceDP.Type);
2484
+ var targetDPS = targetElement.getFreeDockingPointsByType(targetType);
2485
+ for (var j = 0; j < targetDPS.length; j++) {
2486
+ var targetDP = targetDPS[j];
2487
+ if (this.checkDPsDoMatch(sourceDP, targetDP, sourceElement, targetElement)) {
2488
+ var worldPosSourceDP = sourceElement.getWorldPosOfDP(sourceDP.DpId);
2489
+ var worldPosTargetDP = targetElement.getWorldPosOfDP(targetDP.DpId);
2490
+ var distance = Math.sqrt(Math.pow(worldPosSourceDP.x - worldPosTargetDP.x, 2) + Math.pow(worldPosSourceDP.z - worldPosTargetDP.z, 2));
2491
+ if (autoDockingDistance != 0 && (autoDockingDistance == Infinity || distance < autoDockingDistance)) {
2492
+ // dockableDPs.set();
2493
+ //TODO Lea - ich muss mir das paar merken!!!! Hier habe ich ein potentielles Paar gefunden.
2494
+ //Pro dockingPoint merke dir den mit dem kleinsten Abstand
2495
+ if (dockableDPPairs.has(sourceDP.Type)) {
2496
+ if (distance < dockableDPPairs.get(sourceDP.Type).distance) {
2497
+ dockableDPPairs.set(sourceDP.Type, {
2498
+ sourceDP: sourceDP,
2499
+ targetDP: targetDP,
2500
+ distance: distance
2501
+ });
2502
+ }
2503
+ } else {
2504
+ dockableDPPairs.set(sourceDP.Type, {
2505
+ sourceDP: sourceDP,
2506
+ targetDP: targetDP,
2507
+ distance: distance
2508
+ });
2509
+ }
2510
+ }
2511
+ }
2512
+ }
2513
+ }
2514
+ }
2515
+ return dockableDPPairs;
2516
+ }
2517
+
2518
+ /**
2519
+ * This function tries to dock an element sourcePlannerElement to one element in the targetElements
2520
+ * @param sourcePlannerElement the element that must be docked
2521
+ * @param sourceDPType the type of the element that must be docked
2522
+ * @param targetElements the target Element on which the element should be docked
2523
+ * the function returns true when the Element is docked
2524
+ */
2525
+ }, {
2526
+ key: "tryDockElement",
2527
+ value: function tryDockElement(sourcePlannerElement, sourceDPType, targetElements) {
2528
+ var dockingPoints = sourcePlannerElement.getDockingPointsByType(sourceDPType);
2529
+ if (!dockingPoints) {
2530
+ return false;
2531
+ }
2532
+ var refDPType = this.getReferenceDPType(sourceDPType);
2533
+ for (var i = 0; i < targetElements.length; i++) {
2534
+ var targetElement = targetElements[i];
2535
+ if (targetElement.ElementId == sourcePlannerElement.ElementId) continue;
2536
+
2537
+ //this if denies an element (with is not an accessorie) to dock to an accessorie of another element
2538
+ if (!sourcePlannerElement.IsAccessoire && targetElement.IsAccessoire && targetElement.getParentElementId() != sourcePlannerElement.getElementId()) continue;
2539
+ if (sourcePlannerElement.IsAccessoire && !targetElement.getAccessoires().includes(sourcePlannerElement.ArticleCodex)) continue;
2540
+ var targetDockingPoints = targetElement.getDockingPointsByType(refDPType);
2541
+ if (sourcePlannerElement.getIsDockedAccessoire() || sourcePlannerElement.IsAccessoire) {
2542
+ targetDockingPoints = this.sortDockingPoints('LEFT_TO_RIGHT', targetDockingPoints);
2543
+ }
2544
+ if (!targetDockingPoints) continue; //Das target Element hat keinen solchen dp
2545
+ for (var j = 0; j < targetDockingPoints.length; j++) {
2546
+ var targetDockingPoint = targetDockingPoints[j];
2547
+ for (var dpNr = 0; dpNr < dockingPoints.length; dpNr++) {
2548
+ var dockingPoint = dockingPoints[dpNr];
2549
+ if (this.checkDPsDoMatch(dockingPoint, targetDockingPoint, sourcePlannerElement, targetElement)) {
2550
+ //The two docking Points match
2551
+ this.doDock(dockingPoint, targetDockingPoint, sourcePlannerElement.ElementId, targetElement.ElementId); //Passender Docking Point wurde gefunden. Nun erfolgt das docken
2552
+ return dockingPoint;
2553
+ }
2554
+ }
2555
+ }
2556
+ }
2557
+ return false;
2558
+ }
2559
+
2560
+ /**
2561
+ * This function tries to dock an element sourcePlannerElement to the targetElement and a specific DockingPoint of the targetElement
2562
+ * @param sourcePlannerElement the element that must be docked
2563
+ * @param sourceDPType the type of the element that must be docked
2564
+ * @param targetElements the target Element on which the element should be docked
2565
+ * the function returns true when the Element is docked
2566
+ */
2567
+ }, {
2568
+ key: "tryDockElementToDP",
2569
+ value: function tryDockElementToDP(sourcePlannerElement, targetElement, targetDP) {
2570
+ var sourceDPType = this.getReferenceDPType(targetDP.Type);
2571
+ var dockingPoints = sourcePlannerElement.getFreeDockingPointsByType(sourceDPType);
2572
+ if (!dockingPoints) {
2573
+ return false;
2574
+ }
2575
+ for (var i = 0; i < dockingPoints.length; i++) {
2576
+ if (this.checkDPsDoMatch(dockingPoints[i], targetDP, sourcePlannerElement, targetElement)) {
2577
+ //The two docking Points match
2578
+ this.doDock(dockingPoints[i], targetDP, sourcePlannerElement.ElementId, targetElement.ElementId); //Passender Docking Point wurde gefunden. Nun erfolgt das docken
2579
+ return dockingPoints[i];
2580
+ }
2581
+ }
2582
+ return false;
2583
+ }
2584
+
2585
+ /**
2586
+ * This function tries to dock an element sourcePlannerElement to the targetElement and a specific DockingPoint of the targetElement
2587
+ * @param sourcePlannerElement the element that must be docked
2588
+ * @param sourceDPType the type of the element that must be docked
2589
+ * @param sourceDP The source DP
2590
+ * @param targetElements the target Element on which the element should be docked
2591
+ * the function returns true when the Element is docked
2592
+ */
2593
+ }, {
2594
+ key: "tryDockElementDPToDP",
2595
+ value: function tryDockElementDPToDP(sourcePlannerElement, targetElement, sourceDP, targetDP) {
2596
+ if (this.checkDPsDoMatch(sourceDP, targetDP, sourcePlannerElement, targetElement)) {
2597
+ this.doDock(sourceDP, targetDP, sourcePlannerElement.getElementId(), targetElement.getElementId());
2598
+ return true;
2599
+ }
2600
+ return false;
2601
+ }
2602
+
2603
+ /**
2604
+ * this function updates the dockingPoint relations. It is called after reloading one or more SVGs (StretchAreas / SVG Tausch) . For example when changing the ArmRests of
2605
+ * two docking sofas - the old docking information is saved in the plannerElement. The new DockingPoints must be updated based on the previous docking information.
2606
+ * @param plannerElements
2607
+ * @returns returns the list of all Articles that have lost their dockingPoint relations
2608
+ */
2609
+ }, {
2610
+ key: "updateDockingRelations",
2611
+ value: function updateDockingRelations(plannerElements) {
2612
+ //Sort the elements by pos nr
2613
+ var sortedPlannerElementsbyPosNr = [];
2614
+ var accElems = [];
2615
+ plannerElements.forEach(function (plannerElement, elementId) {
2616
+ if (!plannerElement.IsDockedAccessoire) {
2617
+ sortedPlannerElementsbyPosNr[plannerElement.PosNr - 1] = plannerElement;
2618
+ } else {
2619
+ accElems.push(plannerElement);
2620
+ }
2621
+ });
2622
+ sortedPlannerElementsbyPosNr = sortedPlannerElementsbyPosNr.concat(accElems);
2623
+ var elementsLostDockingRelation = [];
2624
+ //nun laufe alle Elemente durch und schaue, ob sie vorher zu einem DP gedockt haben. Diese müssen nun auch gedockt werden, falls möglich
2625
+ for (var i = 0; i < sortedPlannerElementsbyPosNr.length; i++) {
2626
+ if (sortedPlannerElementsbyPosNr[i]) {
2627
+ var element = sortedPlannerElementsbyPosNr[i];
2628
+ var tempDPs = element.getTempDockingPoints();
2629
+ for (var j = 0; j < tempDPs.length; j++) {
2630
+ var tempDP = tempDPs[j];
2631
+ if (tempDP.IsDocking && tempDP.OnElementId) {
2632
+ //Check if tempDP still exists.
2633
+ var dp = element.getDockingPointById(tempDP.DpId);
2634
+ if (dp == undefined) {
2635
+ //In this case the dockingPoint does not exist anymore
2636
+ var targetElement = plannerElements.get(tempDP.OnElementId);
2637
+
2638
+ //In some cases like hasena fjord it can happen - that the Dockingpoint nummer has changed.
2639
+ //First kopfteil and rahmen have docked using AVO_1 and AVU_1. When changing the size of the bedframe the docking Points get changed AVO_2 and AVU_2.
2640
+ //In this case -look if both elements only have 1 dockingpoint of the same Type - and then redock them.
2641
+
2642
+ var dockingPointsCurElement = element.getFreeDockingPointsByType(tempDP.Type);
2643
+ if (dockingPointsCurElement.length == 1) {
2644
+ var dockingPointsToDockElement = targetElement === null || targetElement === void 0 ? void 0 : targetElement.getFreeDockingPointsByType(this.getReferenceDPType(tempDP.Type));
2645
+ if ((dockingPointsToDockElement === null || dockingPointsToDockElement === void 0 ? void 0 : dockingPointsToDockElement.length) == 1) {
2646
+ this.tryDockElementDPToDP(element, targetElement, dockingPointsCurElement[0], dockingPointsToDockElement[0]);
2647
+ continue;
2648
+ }
2649
+ }
2650
+ if (targetElement) elementsLostDockingRelation.push(targetElement);
2651
+ continue;
2652
+ }
2653
+ //Suche den targetDP und schaue ob sie schon docken
2654
+ if (plannerElements.has(tempDP.OnElementId)) {
2655
+ var _targetElement = plannerElements.get(tempDP.OnElementId);
2656
+ var targetDP = _targetElement === null || _targetElement === void 0 ? void 0 : _targetElement.getDockingPointById(tempDP.OnDP.DpId);
2657
+ this.tryDockElementDPToDP(element, _targetElement, dp, targetDP);
2658
+ }
2659
+ }
2660
+ }
2661
+ }
2662
+ }
2663
+ for (var i = 0; i < sortedPlannerElementsbyPosNr.length; i++) {
2664
+ if (sortedPlannerElementsbyPosNr[i]) sortedPlannerElementsbyPosNr[i].clearTempDockingPoints();
2665
+ }
2666
+ return elementsLostDockingRelation;
2667
+ }
2668
+ /**
2669
+ * This function is used when initialiazing a planning. In the old planner we do only know that a docking point of a specific kind (AVL) of the source Element docks with any docking Point of the targetPlannerElement.
2670
+ * If there is only one target docking Point in the reference object - dock to that. However, when looking at AVOs, there can be that the target element has two AVUs. In this case search the docking point that is the neares.
2671
+ * @param sourcePlannerElement
2672
+ * @param targetPlannerElement
2673
+ * @param sourceDPType The type of the dockingPoint
2674
+ */
2675
+ }, {
2676
+ key: "initDockingPointRelationByArea",
2677
+ value: function initDockingPointRelationByArea(sourcePlannerElement, targetPlannerElement, sourceDPType) {
2678
+ // let refDPTarget = this.getReferenceDPType(sourceDPType);
2679
+ var freeSourceDPs = sourcePlannerElement.getFreeDockingPointsByType(sourceDPType);
2680
+ //let allTargetDPs = targetPlannerElement.getDockingPointsByType(refDPTarget);
2681
+
2682
+ if (freeSourceDPs.length > 0) {
2683
+ var allDockingPairs = this.searchDockableElementsInArea(sourcePlannerElement, [targetPlannerElement], Infinity);
2684
+ if (allDockingPairs.has(sourceDPType)) {
2685
+ var dockingPair = allDockingPairs.get(sourceDPType);
2686
+ if (dockingPair) {
2687
+ var success = this.tryDockElementDPToDP(sourcePlannerElement, targetPlannerElement, dockingPair.sourceDP, dockingPair.targetDP);
2688
+ if (!success) {
2689
+ LOG$1.debug('Error when initializing docking Points. Two dockingpoints could not be matched. sourceDP: ' + dockingPair.sourceDP.DpId + '; sourceRlementId: ' + dockingPair.sourceDP.ElementId + '; targetDP: ' + dockingPair.targetDP.DpId + ' targetElemId: ' + dockingPair.targetDP.ElementId);
2690
+ }
2691
+ }
2692
+ }
2693
+ }
2694
+ }
2695
+
2696
+ /**
2697
+ * This function returns true if the two elements are docking. False if they are not
2698
+ * @param element1
2699
+ * @param element2
2700
+ */
2701
+ }, {
2702
+ key: "checkElementsAreDocking",
2703
+ value: function checkElementsAreDocking(element1, element2) {
2704
+ var allDockingDockingPoints = element1.getDockingDockingPoints();
2705
+ for (var i = 0; i < allDockingDockingPoints.length; i++) {
2706
+ var dp = allDockingDockingPoints[i];
2707
+ if (dp.OnElementId == element2.getElementId()) return true;
2708
+ }
2709
+ return false;
2710
+ }
2711
+ }]);
2712
+ }();
2713
+ var dockingPointHandlerInst = new DockingPointHandler();
2714
+
1478
2715
  var LOG = DivaUtils.initLog('Planner', 'WEB-PLANNER-LOGIC');
1479
2716
  //Diese Klasse dient dazu, die 2D Shapes zu verwalten. Achtung_ Hier wird es aber noch nicht angezeigt
1480
2717
  var PlannerHandler2D = /*#__PURE__*/function () {
@@ -1781,4 +3018,4 @@ var PlannerHandler2D = /*#__PURE__*/function () {
1781
3018
  }();
1782
3019
  var handler2D = new PlannerHandler2D();
1783
3020
 
1784
- export { handler2D as h };
3021
+ export { PlannerElementData as P, dockingPointHandlerInst as d, handler2D as h };