@crystaldesign/web-planner-logic 25.10.0-beta.2 → 25.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.
- package/build/cjs/{DivaBoxPlanner-1364c551.js → DivaBoxPlanner-fc5a962d.js} +20 -17
- package/build/cjs/{DivaStandardPlanner-e6e39978.js → DivaStandardPlanner-f09fa7e9.js} +7 -6
- package/build/cjs/{DoorPlanner-10e97f07.js → DoorPlanner-5ab59c7b.js} +1 -1
- package/build/cjs/{Host3DSignalR-eea7d1d4.js → Host3DSignalR-14301399.js} +1 -1
- package/build/cjs/{LiviqueWWSHandler-17894cd1.js → LiviqueWWSHandler-34307071.js} +1 -1
- package/build/cjs/{PfisterWWSHandler-4058e465.js → PfisterWWSHandler-e995f1a4.js} +1 -1
- package/build/cjs/{PlannerHandler2D-41d9d0cf.js → PlannerHandler2D-977068cd.js} +5 -869
- package/build/cjs/{SeriousBasketHandler-c8e698e9.js → SeriousBasketHandler-69b52486.js} +1 -1
- package/build/cjs/{ShelfPlanner-33014e25.js → ShelfPlanner-45fdd5ee.js} +1 -1
- package/build/cjs/{StandardWWSHandler-faeb77e7.js → StandardWWSHandler-e9ea0835.js} +1 -1
- package/build/cjs/{index-f1e5aa56.js → index-48339e17.js} +2234 -1073
- package/build/cjs/index.js +2 -1
- package/build/esm/{DivaBoxPlanner-fcf19f4c.js → DivaBoxPlanner-b5606f5a.js} +17 -14
- package/build/esm/{DivaStandardPlanner-5221526b.js → DivaStandardPlanner-c2dcc724.js} +3 -2
- package/build/esm/{DoorPlanner-27fa5a55.js → DoorPlanner-98493e3e.js} +1 -1
- package/build/esm/{Host3DSignalR-e85d1c87.js → Host3DSignalR-2a6bc1d8.js} +1 -1
- package/build/esm/{LiviqueWWSHandler-494ad9a9.js → LiviqueWWSHandler-740ebe8a.js} +1 -1
- package/build/esm/{PfisterWWSHandler-39c3f3e2.js → PfisterWWSHandler-bbad4a79.js} +1 -1
- package/build/esm/{PlannerHandler2D-1a23208c.js → PlannerHandler2D-606688dc.js} +4 -867
- package/build/esm/{SeriousBasketHandler-51aa34db.js → SeriousBasketHandler-e15ee63f.js} +1 -1
- package/build/esm/{ShelfPlanner-9f2c145d.js → ShelfPlanner-4f2847bb.js} +1 -1
- package/build/esm/{StandardWWSHandler-6d93ce48.js → StandardWWSHandler-bc2261e1.js} +1 -1
- package/build/esm/{index-51b98cbc.js → index-228f4a0a.js} +2234 -1074
- package/build/esm/index.js +1 -1
- package/build/types/web-planner-logic/src/index.d.ts +3 -2
- package/build/types/web-planner-logic/src/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/AdditionalModelInfos.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts +2 -6
- package/build/types/web-planner-logic/src/interface/ArticleOptionStateType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/Configuration.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts +3 -7
- package/build/types/web-planner-logic/src/interface/OptionTypes/ArticleOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/OptionTypes/CatalogOptionDataTypes.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/Planner/PlannerDataType.d.ts +2 -2
- package/build/types/web-planner-logic/src/interface/Planner/PlannerDataType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts +1 -1
- package/build/types/web-planner-logic/src/interface/ViewTypes/index.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts +1 -0
- package/build/types/web-planner-logic/src/interface/webPlannerParams/WebPlannerParamsType.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts +4 -12
- package/build/types/web-planner-logic/src/logic/Article/ArticleOptionState.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts +7 -8
- package/build/types/web-planner-logic/src/logic/Article/DivaArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts +1 -1
- package/build/types/web-planner-logic/src/logic/Article/DivaArticleHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts +1 -0
- package/build/types/web-planner-logic/src/logic/Article/Engine/DivaArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Article/Engine/IDMArticleEngine.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Basket/DivaBasketHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTree.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/ConfigTree/DivaConfigTreeHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaApiHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts +3 -2
- package/build/types/web-planner-logic/src/logic/DivaWebPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/BoxPlannerGrid.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/ConstructionRulesHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts +7 -11
- package/build/types/web-planner-logic/src/logic/Planner/BoxPlanner/DivaBoxPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts +9 -8
- package/build/types/web-planner-logic/src/logic/Planner/DivaPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts +7 -11
- package/build/types/web-planner-logic/src/logic/Planner/DivaStandardPlanner.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts +2 -2
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/PlannerHandler2D.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SetPlannerHandler.d.ts +4 -4
- package/build/types/web-planner-logic/src/logic/Planner/PlannerUtils/SetPlannerHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts +1 -2
- package/build/types/web-planner-logic/src/logic/Set/DivaSet.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts +13 -2
- package/build/types/web-planner-logic/src/logic/Set/DivaSetHandler.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/CatalogArticleData.d.ts +1 -1
- package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts +1 -3
- package/build/types/web-planner-logic/src/model/Articles/Article/DivaCatalogArticle.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Catalog/CatalogData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts +2 -6
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts +2 -6
- package/build/types/web-planner-logic/src/model/Options/ArticleOptionValueData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts +2 -3
- package/build/types/web-planner-logic/src/model/Planner/PlannerElementData.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-dev.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/pfister-prod.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-dev.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-prod-IDM.d.ts.map +1 -1
- package/build/types/web-planner-logic/src/test/datas/environments/testing/retail-test.d.ts.map +1 -1
- package/package.json +2 -2
- package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts +0 -57
- package/build/types/web-planner-logic/src/interface/Planner/IDivaPlanner.d.ts.map +0 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts +0 -50
- package/build/types/web-planner-logic/src/interface/Planner/IDivaSetPlanner.d.ts.map +0 -1
- package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts +0 -63
- package/build/types/web-planner-logic/src/interface/Planner/IDivaViewPlannerElement.d.ts.map +0 -1
|
@@ -1,890 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
3
4
|
var _classCallCheck = require('@babel/runtime/helpers/classCallCheck');
|
|
4
5
|
var _createClass = require('@babel/runtime/helpers/createClass');
|
|
5
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
6
|
-
var index = require('./index-f1e5aa56.js');
|
|
7
|
-
var DivaUtils = require('@crystaldesign/diva-utils');
|
|
8
|
-
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
9
7
|
var _regeneratorRuntime = require('@babel/runtime/regenerator');
|
|
8
|
+
var index = require('./index-48339e17.js');
|
|
10
9
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
11
10
|
var fabric = require('fabric');
|
|
11
|
+
var DivaUtils = require('@crystaldesign/diva-utils');
|
|
12
12
|
var serialize = require('w3c-xmlserializer');
|
|
13
13
|
|
|
14
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
15
|
|
|
16
|
+
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
16
17
|
var _classCallCheck__default = /*#__PURE__*/_interopDefaultLegacy(_classCallCheck);
|
|
17
18
|
var _createClass__default = /*#__PURE__*/_interopDefaultLegacy(_createClass);
|
|
18
19
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
19
|
-
var DivaUtils__default = /*#__PURE__*/_interopDefaultLegacy(DivaUtils);
|
|
20
|
-
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator);
|
|
21
20
|
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefaultLegacy(_regeneratorRuntime);
|
|
22
21
|
var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumableArray);
|
|
22
|
+
var DivaUtils__default = /*#__PURE__*/_interopDefaultLegacy(DivaUtils);
|
|
23
23
|
var serialize__default = /*#__PURE__*/_interopDefaultLegacy(serialize);
|
|
24
24
|
|
|
25
|
-
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; }
|
|
26
|
-
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__default["default"](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; }
|
|
27
|
-
var PlannerElementData = /*#__PURE__*/function () {
|
|
28
|
-
function PlannerElementData(setId, basketId, _elementId, plannerType) {
|
|
29
|
-
_classCallCheck__default["default"](this, PlannerElementData);
|
|
30
|
-
_defineProperty__default["default"](this, "planElement", void 0);
|
|
31
|
-
_defineProperty__default["default"](this, "plannerStateHash", void 0);
|
|
32
|
-
//this value saves the state of the plannerData - used to check if plannerData state changed
|
|
33
|
-
// private dockingPoints: Map<string, DockingPoint[]>; //This map saves all docking Points accessioated to a type
|
|
34
|
-
_defineProperty__default["default"](this, "dockingPoints", void 0);
|
|
35
|
-
//This map saves all docking Points accessioated to a type
|
|
36
|
-
_defineProperty__default["default"](this, "tempDockingPoints", void 0);
|
|
37
|
-
//When reloading the element this array saves the previous docking points for redocking
|
|
38
|
-
_defineProperty__default["default"](this, "plannerType", void 0);
|
|
39
|
-
_defineProperty__default["default"](this, "basketId", void 0);
|
|
40
|
-
_defineProperty__default["default"](this, "doSetWidthFromSVG", void 0);
|
|
41
|
-
_defineProperty__default["default"](this, "doSetDepthFromSVG", void 0);
|
|
42
|
-
this.basketId = basketId;
|
|
43
|
-
this.planElement = {
|
|
44
|
-
elementId: _elementId,
|
|
45
|
-
setId: setId,
|
|
46
|
-
worldPosCenter: new index.Vector3(0, 0, 0),
|
|
47
|
-
//welt Position der linken hinteren unteren Ecke des Elementes
|
|
48
|
-
rotDeg: 0,
|
|
49
|
-
posNr: -1,
|
|
50
|
-
setPosNr: -1,
|
|
51
|
-
oltDepth: 0,
|
|
52
|
-
oltWidth: 0,
|
|
53
|
-
oltLeft: 0,
|
|
54
|
-
oltTop: 0
|
|
55
|
-
};
|
|
56
|
-
// this.dockingPoints = new Map<string, DockingPoint[]>();
|
|
57
|
-
this.dockingPoints = [];
|
|
58
|
-
this.tempDockingPoints = [];
|
|
59
|
-
this.plannerStateHash = '';
|
|
60
|
-
this.plannerType = plannerType;
|
|
61
|
-
this.doSetWidthFromSVG = false;
|
|
62
|
-
this.doSetDepthFromSVG = false;
|
|
63
|
-
}
|
|
64
|
-
return _createClass__default["default"](PlannerElementData, [{
|
|
65
|
-
key: "destroy",
|
|
66
|
-
value: function destroy() {
|
|
67
|
-
this.planElement.svgShapeOLF2D = null;
|
|
68
|
-
this.planElement.svgShapeOLT2D = null;
|
|
69
|
-
this.planElement.svgAsHTMLCanvas = undefined;
|
|
70
|
-
this.dockingPoints = [];
|
|
71
|
-
this.tempDockingPoints = [];
|
|
72
|
-
}
|
|
73
|
-
}, {
|
|
74
|
-
key: "getTempDockingPoints",
|
|
75
|
-
value: function getTempDockingPoints() {
|
|
76
|
-
return this.tempDockingPoints;
|
|
77
|
-
}
|
|
78
|
-
}, {
|
|
79
|
-
key: "clearTempDockingPoints",
|
|
80
|
-
value: function clearTempDockingPoints() {
|
|
81
|
-
this.tempDockingPoints = [];
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
key: "getDockingPoints",
|
|
85
|
-
value: function getDockingPoints() {
|
|
86
|
-
return this.dockingPoints;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* 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.
|
|
91
|
-
* @param type Type of the docking point
|
|
92
|
-
*/
|
|
93
|
-
}, {
|
|
94
|
-
key: "dockingTypeIsDocking",
|
|
95
|
-
value: function dockingTypeIsDocking(type) {
|
|
96
|
-
var dockingPoints = this.getDockingPointsByType(type);
|
|
97
|
-
for (var i = 0; i < dockingPoints.length; i++) {
|
|
98
|
-
if (dockingPoints[i].IsDocking) return true;
|
|
99
|
-
}
|
|
100
|
-
return false;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* This function returns all docking DPs of a specific type.
|
|
105
|
-
* @param type The type of the docking Point , e.g. AVL
|
|
106
|
-
*/
|
|
107
|
-
}, {
|
|
108
|
-
key: "getDockingDockingPointsByType",
|
|
109
|
-
value: function getDockingDockingPointsByType(type) {
|
|
110
|
-
var dockingPoints = this.getDockingPointsByType(type);
|
|
111
|
-
var ret = [];
|
|
112
|
-
for (var i = 0; i < dockingPoints.length; i++) {
|
|
113
|
-
if (dockingPoints[i].IsDocking) ret.push(dockingPoints[i]);
|
|
114
|
-
}
|
|
115
|
-
return ret;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* This function returns all docking DPs of any type.
|
|
120
|
-
*/
|
|
121
|
-
}, {
|
|
122
|
-
key: "getDockingDockingPoints",
|
|
123
|
-
value: function getDockingDockingPoints() {
|
|
124
|
-
var ret = [];
|
|
125
|
-
for (var i = 0; i < this.dockingPoints.length; i++) {
|
|
126
|
-
if (this.dockingPoints[i].IsDocking) ret.push(this.dockingPoints[i]);
|
|
127
|
-
}
|
|
128
|
-
return ret;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* This function returns all notDocking DPs of a specific type.
|
|
133
|
-
* @param type The type of the docking Point , e.g. AVL
|
|
134
|
-
*/
|
|
135
|
-
}, {
|
|
136
|
-
key: "getFreeDockingPointsByType",
|
|
137
|
-
value: function getFreeDockingPointsByType(type) {
|
|
138
|
-
var dockingPoints = this.getDockingPointsByType(type);
|
|
139
|
-
var ret = [];
|
|
140
|
-
for (var i = 0; i < dockingPoints.length; i++) {
|
|
141
|
-
if (!dockingPoints[i].IsDocking) ret.push(dockingPoints[i]);
|
|
142
|
-
}
|
|
143
|
-
return ret;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* This function returns the free docking with the specific type and number
|
|
148
|
-
* @param type
|
|
149
|
-
* @param number
|
|
150
|
-
*/
|
|
151
|
-
}, {
|
|
152
|
-
key: "getFreeDockingPointByTypeAndNumber",
|
|
153
|
-
value: function getFreeDockingPointByTypeAndNumber(type, number) {
|
|
154
|
-
for (var i = 0; i < this.dockingPoints.length; i++) {
|
|
155
|
-
if (!this.dockingPoints[i].IsDocking && this.dockingPoints[i].Type == type && this.dockingPoints[i].Number == number) return this.dockingPoints[i];
|
|
156
|
-
}
|
|
157
|
-
return undefined;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* This function returns all docking points of the element. It returns docking and not docking points with any type.
|
|
162
|
-
*/
|
|
163
|
-
}, {
|
|
164
|
-
key: "getAllDockingPoints",
|
|
165
|
-
value: function getAllDockingPoints() {
|
|
166
|
-
return this.dockingPoints;
|
|
167
|
-
}
|
|
168
|
-
}, {
|
|
169
|
-
key: "getDockingPointsByType",
|
|
170
|
-
value: function getDockingPointsByType(type) {
|
|
171
|
-
var dps = [];
|
|
172
|
-
for (var i = 0; i < this.dockingPoints.length; i++) {
|
|
173
|
-
if (this.dockingPoints[i].Type == type) {
|
|
174
|
-
dps.push(this.dockingPoints[i]);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return dps;
|
|
178
|
-
}
|
|
179
|
-
}, {
|
|
180
|
-
key: "getDockingPointById",
|
|
181
|
-
value: function getDockingPointById(id) {
|
|
182
|
-
for (var i = 0; i < this.dockingPoints.length; i++) {
|
|
183
|
-
if (this.dockingPoints[i].DpId == id) {
|
|
184
|
-
return this.dockingPoints[i];
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return undefined;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* This function retuns the DockingPoint info in a string format that is used for the 3D image rendering planningData.
|
|
191
|
-
*/
|
|
192
|
-
}, {
|
|
193
|
-
key: "getDockingPointJS3D",
|
|
194
|
-
value: function getDockingPointJS3D() {
|
|
195
|
-
var dpJS = '';
|
|
196
|
-
for (var i = 0; i < this.dockingPoints.length; i++) {
|
|
197
|
-
var dockingPoint = this.dockingPoints[i];
|
|
198
|
-
if (dockingPoint.IsDocking) {
|
|
199
|
-
if (dpJS != '') dpJS += ',';
|
|
200
|
-
dpJS += dockingPoint.Name + ':' + 'E' + dockingPoint.OnElementId;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return dpJS;
|
|
204
|
-
}
|
|
205
|
-
}, {
|
|
206
|
-
key: "ArticleCodex",
|
|
207
|
-
get: function get() {
|
|
208
|
-
var _this$planElement$pla, _this$planElement$pla2;
|
|
209
|
-
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 : '';
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Returns true if the accessoire is docked to another element in the planner (relatedToBasketID is set).
|
|
213
|
-
*/
|
|
214
|
-
}, {
|
|
215
|
-
key: "IsDockedAccessoire",
|
|
216
|
-
get: function get() {
|
|
217
|
-
return this.planElement.plannerData ? this.planElement.plannerData.isAccessoire : false;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
//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
|
|
221
|
-
//this.planElement.plannerData?.filterType == "Accessoire" -> This is always true - The Accesssoire article is listed as accessoire
|
|
222
|
-
}, {
|
|
223
|
-
key: "IsAccessoire",
|
|
224
|
-
get: function get() {
|
|
225
|
-
var _this$planElement$pla3, _this$planElement$pla4;
|
|
226
|
-
return ((_this$planElement$pla3 = this.planElement.plannerData) === null || _this$planElement$pla3 === void 0 ? void 0 : _this$planElement$pla3.filterType) == 'Accessoire' || ((_this$planElement$pla4 = this.planElement.plannerData) === null || _this$planElement$pla4 === void 0 ? void 0 : _this$planElement$pla4.isAccessoire);
|
|
227
|
-
}
|
|
228
|
-
}, {
|
|
229
|
-
key: "FilterAVL",
|
|
230
|
-
get: function get() {
|
|
231
|
-
return this.getFilterAVL();
|
|
232
|
-
}
|
|
233
|
-
}, {
|
|
234
|
-
key: "FilterAVR",
|
|
235
|
-
get: function get() {
|
|
236
|
-
return this.getFilterAVR();
|
|
237
|
-
}
|
|
238
|
-
}, {
|
|
239
|
-
key: "PosNr",
|
|
240
|
-
get: function get() {
|
|
241
|
-
return this.planElement.posNr;
|
|
242
|
-
},
|
|
243
|
-
set: function set(posNr) {
|
|
244
|
-
this.planElement.posNr = posNr;
|
|
245
|
-
}
|
|
246
|
-
}, {
|
|
247
|
-
key: "SetPosNr",
|
|
248
|
-
set: function set(setPosNr) {
|
|
249
|
-
this.planElement.setPosNr = setPosNr;
|
|
250
|
-
}
|
|
251
|
-
}, {
|
|
252
|
-
key: "AccessoirePosNr",
|
|
253
|
-
get: function get() {
|
|
254
|
-
return this.planElement.posNrAcc != undefined ? this.planElement.posNrAcc : -1;
|
|
255
|
-
},
|
|
256
|
-
set: function set(posNr) {
|
|
257
|
-
this.planElement.posNrAcc = posNr;
|
|
258
|
-
}
|
|
259
|
-
}, {
|
|
260
|
-
key: "WorldPosCenter",
|
|
261
|
-
get: function get() {
|
|
262
|
-
return this.planElement.worldPosCenter;
|
|
263
|
-
},
|
|
264
|
-
set: function set(pos) {
|
|
265
|
-
this.planElement.worldPosCenter = pos;
|
|
266
|
-
}
|
|
267
|
-
}, {
|
|
268
|
-
key: "WorldPosCenterIgnoreOLF",
|
|
269
|
-
get: function get() {
|
|
270
|
-
var olfCorner = this.WorldPosCorner;
|
|
271
|
-
var centerDir = new index.Vector2(this.planElement.oltLeft + this.planElement.oltWidth / 2.0, this.planElement.oltTop + this.planElement.oltDepth / 2.0);
|
|
272
|
-
centerDir = index.Vector2.rotateOrigin(centerDir, this.planElement.rotDeg);
|
|
273
|
-
var worldPosCornerIgnoreOLF = new index.Vector3(olfCorner.x + centerDir.x, this.WorldPosCenter.y, olfCorner.z + centerDir.y);
|
|
274
|
-
return worldPosCornerIgnoreOLF;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* This function returns the world pos of the top left bottom corner.
|
|
279
|
-
*/
|
|
280
|
-
}, {
|
|
281
|
-
key: "WorldPosCorner",
|
|
282
|
-
get: function get() {
|
|
283
|
-
if (this.planElement.plannerData == null) return new index.Vector3(0, 0, 0);
|
|
284
|
-
var cornerDir = new index.Vector2(-this.planElement.plannerData.width / 2, -this.planElement.plannerData.depth / 2);
|
|
285
|
-
cornerDir = index.Vector2.rotateOrigin(cornerDir, this.planElement.rotDeg);
|
|
286
|
-
return new index.Vector3(this.planElement.worldPosCenter.x + cornerDir.x, this.planElement.worldPosCenter.y - this.planElement.plannerData.height / 2, this.planElement.worldPosCenter.z + cornerDir.y);
|
|
287
|
-
},
|
|
288
|
-
set: function set(cornerPos) {
|
|
289
|
-
if (!this.planElement.plannerData) return;
|
|
290
|
-
var centerDir = new index.Vector2(this.planElement.plannerData.width / 2, this.planElement.plannerData.depth / 2);
|
|
291
|
-
centerDir = index.Vector2.rotateOrigin(centerDir, this.planElement.rotDeg);
|
|
292
|
-
this.planElement.worldPosCenter = new index.Vector3(cornerPos.x + centerDir.x, cornerPos.y + this.planElement.plannerData.height / 2, cornerPos.z + centerDir.y);
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* This function updates the world position and rotation of the element based of some delta Elements
|
|
297
|
-
* @param deltaMove delta translation in cm
|
|
298
|
-
* @param deltaRotDeg delta rotation in degrees
|
|
299
|
-
* @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
|
|
300
|
-
*/
|
|
301
|
-
}, {
|
|
302
|
-
key: "updateDeltaTrans",
|
|
303
|
-
value: function updateDeltaTrans(deltaMove, deltaRotDeg, rotCorrection, correctAngle) {
|
|
304
|
-
this.WorldPosCenter = new index.Vector3(this.WorldPosCenter.x + deltaMove.x, this.WorldPosCenter.y + deltaMove.y, this.WorldPosCenter.z + deltaMove.z);
|
|
305
|
-
if (deltaRotDeg != 0 || correctAngle) {
|
|
306
|
-
if (correctAngle) {
|
|
307
|
-
var newRot = this.RotDeg + deltaRotDeg;
|
|
308
|
-
if (rotCorrection != 0) {
|
|
309
|
-
if (Math.abs(newRot % rotCorrection) > rotCorrection / 2) {
|
|
310
|
-
deltaRotDeg = deltaRotDeg + rotCorrection - Math.abs(newRot % rotCorrection);
|
|
311
|
-
} else {
|
|
312
|
-
deltaRotDeg = deltaRotDeg + Math.abs(newRot % rotCorrection);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
this.processCenterRot(deltaRotDeg);
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
}, {
|
|
320
|
-
key: "processCenterRot",
|
|
321
|
-
value: function processCenterRot(deltaRot) {
|
|
322
|
-
this.RotDeg = this.RotDeg + deltaRot;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Returns the position in world coordinates of the DP of the element depending on the position and rotation of the planner element
|
|
326
|
-
* @param dpID
|
|
327
|
-
*/
|
|
328
|
-
}, {
|
|
329
|
-
key: "getWorldPosOfDP",
|
|
330
|
-
value: function getWorldPosOfDP(dpID) {
|
|
331
|
-
var dp = this.getDockingPointById(dpID);
|
|
332
|
-
if (dp == undefined) return new index.Vector3(0, 0, 0);
|
|
333
|
-
var rotatedDir = index.Vector2.rotateOrigin(new index.Vector2(dp === null || dp === void 0 ? void 0 : dp.LocalWorldPos.x, dp === null || dp === void 0 ? void 0 : dp.LocalWorldPos.z), this.RotDeg);
|
|
334
|
-
return new index.Vector3(this.WorldPosCorner.x + rotatedDir.x, this.WorldPosCorner.y, this.WorldPosCorner.z + rotatedDir.y);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Returns the outlines of the bounding box in world coordinates
|
|
339
|
-
*/
|
|
340
|
-
}, {
|
|
341
|
-
key: "getWorld2DBBoxOutline",
|
|
342
|
-
value: function getWorld2DBBoxOutline() {
|
|
343
|
-
var bboxPoints = [];
|
|
344
|
-
bboxPoints.push(new index.Vector2(this.WorldPosCorner.x, this.WorldPosCorner.z));
|
|
345
|
-
var helper = index.Vector2.rotateOrigin(new index.Vector2(this.getGlobalWidth(), 0), this.RotDeg);
|
|
346
|
-
bboxPoints.push(new index.Vector2(this.WorldPosCorner.x + helper.x, this.WorldPosCorner.z + helper.y));
|
|
347
|
-
helper = index.Vector2.rotateOrigin(new index.Vector2(this.getGlobalWidth(), this.getGlobalDepth()), this.RotDeg);
|
|
348
|
-
bboxPoints.push(new index.Vector2(this.WorldPosCorner.x + helper.x, this.WorldPosCorner.z + helper.y));
|
|
349
|
-
helper = index.Vector2.rotateOrigin(new index.Vector2(0, this.getGlobalDepth()), this.RotDeg);
|
|
350
|
-
bboxPoints.push(new index.Vector2(this.WorldPosCorner.x + helper.x, this.WorldPosCorner.z + helper.y));
|
|
351
|
-
return bboxPoints;
|
|
352
|
-
}
|
|
353
|
-
}, {
|
|
354
|
-
key: "RotDeg",
|
|
355
|
-
get: function get() {
|
|
356
|
-
return this.planElement.rotDeg;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Saves the current docking point state
|
|
361
|
-
*/,
|
|
362
|
-
set: function set(rot) {
|
|
363
|
-
this.planElement.rotDeg = rot;
|
|
364
|
-
}
|
|
365
|
-
}, {
|
|
366
|
-
key: "saveCurrentDPState",
|
|
367
|
-
value: function saveCurrentDPState() {
|
|
368
|
-
if (this.dockingPoints && this.dockingPoints.length > 0) {
|
|
369
|
-
this.tempDockingPoints = [];
|
|
370
|
-
for (var i = 0; i < this.dockingPoints.length; i++) {
|
|
371
|
-
this.tempDockingPoints.push(this.dockingPoints[i].clone());
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}, {
|
|
376
|
-
key: "clearAllDockingPoints",
|
|
377
|
-
value: function clearAllDockingPoints() {
|
|
378
|
-
this.dockingPoints = [];
|
|
379
|
-
}
|
|
380
|
-
}, {
|
|
381
|
-
key: "addDockingPoint",
|
|
382
|
-
value: function addDockingPoint(dockingPoint) {
|
|
383
|
-
this.dockingPoints.push(dockingPoint);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
//Sets the planner Data. Returns true if something changed -> Reload
|
|
387
|
-
}, {
|
|
388
|
-
key: "updatePlannerData",
|
|
389
|
-
value: function updatePlannerData(data) {
|
|
390
|
-
//The plannerData ist keine Kopie, sondern ein verweis - wenn im Konfigurator das PlannerData Object geändert wird, dann wird es das hier auch.
|
|
391
|
-
if ((data === null || data === void 0 ? void 0 : data.width) == undefined || data.width == -1) {
|
|
392
|
-
this.doSetWidthFromSVG = true;
|
|
393
|
-
} else {
|
|
394
|
-
this.doSetWidthFromSVG = false;
|
|
395
|
-
}
|
|
396
|
-
if ((data === null || data === void 0 ? void 0 : data.depth) == undefined || data.depth == -1) {
|
|
397
|
-
this.doSetDepthFromSVG = true;
|
|
398
|
-
} else {
|
|
399
|
-
this.doSetDepthFromSVG = false;
|
|
400
|
-
}
|
|
401
|
-
if (this.planElement.plannerData == null && data != null) {
|
|
402
|
-
this.planElement.plannerData = data;
|
|
403
|
-
this.plannerStateHash = DivaUtils.md5(JSON.stringify(this.planElement.plannerData));
|
|
404
|
-
return true;
|
|
405
|
-
}
|
|
406
|
-
if (data != null) this.planElement.plannerData = data;
|
|
407
|
-
if (!this.planElement.plannerData) return false;
|
|
408
|
-
var plannerDataForCache = _objectSpread(_objectSpread({}, this.planElement.plannerData), {}, {
|
|
409
|
-
currentAccessorires: []
|
|
410
|
-
});
|
|
411
|
-
var currentHash = DivaUtils.md5(JSON.stringify(plannerDataForCache));
|
|
412
|
-
if (this.plannerStateHash != currentHash) {
|
|
413
|
-
this.plannerStateHash = currentHash;
|
|
414
|
-
return true;
|
|
415
|
-
}
|
|
416
|
-
return false;
|
|
417
|
-
}
|
|
418
|
-
}, {
|
|
419
|
-
key: "cleanShapeOLF2D",
|
|
420
|
-
value: function cleanShapeOLF2D() {
|
|
421
|
-
this.planElement.svgShapeOLF2D = undefined;
|
|
422
|
-
}
|
|
423
|
-
}, {
|
|
424
|
-
key: "cleanShapeOLT2D",
|
|
425
|
-
value: function cleanShapeOLT2D() {
|
|
426
|
-
this.planElement.svgShapeOLT2D = undefined;
|
|
427
|
-
}
|
|
428
|
-
}, {
|
|
429
|
-
key: "DoSetWidthFromSVG",
|
|
430
|
-
get: function get() {
|
|
431
|
-
return this.doSetWidthFromSVG;
|
|
432
|
-
}
|
|
433
|
-
}, {
|
|
434
|
-
key: "DoSetDepthFromSVG",
|
|
435
|
-
get: function get() {
|
|
436
|
-
return this.doSetDepthFromSVG;
|
|
437
|
-
}
|
|
438
|
-
}, {
|
|
439
|
-
key: "WidthFromSVG",
|
|
440
|
-
set: function set(svgWidth) {
|
|
441
|
-
if (this.planElement.plannerData) this.planElement.plannerData.width = svgWidth;
|
|
442
|
-
this.doSetWidthFromSVG = false;
|
|
443
|
-
}
|
|
444
|
-
}, {
|
|
445
|
-
key: "DepthFromSVG",
|
|
446
|
-
set: function set(svgDepth) {
|
|
447
|
-
if (this.planElement.plannerData) this.planElement.plannerData.depth = svgDepth;
|
|
448
|
-
this.doSetDepthFromSVG = false;
|
|
449
|
-
}
|
|
450
|
-
}, {
|
|
451
|
-
key: "ElementId",
|
|
452
|
-
get: function get() {
|
|
453
|
-
return this.planElement.elementId;
|
|
454
|
-
}
|
|
455
|
-
}, {
|
|
456
|
-
key: "SvgFileName",
|
|
457
|
-
get: function get() {
|
|
458
|
-
var _this$planElement$pla5;
|
|
459
|
-
return (_this$planElement$pla5 = this.planElement.plannerData) === null || _this$planElement$pla5 === void 0 ? void 0 : _this$planElement$pla5.curSVG;
|
|
460
|
-
}
|
|
461
|
-
}, {
|
|
462
|
-
key: "Width",
|
|
463
|
-
get: function get() {
|
|
464
|
-
var _this$planElement$pla6;
|
|
465
|
-
return (_this$planElement$pla6 = this.planElement.plannerData) === null || _this$planElement$pla6 === void 0 ? void 0 : _this$planElement$pla6.width;
|
|
466
|
-
}
|
|
467
|
-
}, {
|
|
468
|
-
key: "Height",
|
|
469
|
-
get: function get() {
|
|
470
|
-
var _this$planElement$pla7;
|
|
471
|
-
return (_this$planElement$pla7 = this.planElement.plannerData) === null || _this$planElement$pla7 === void 0 ? void 0 : _this$planElement$pla7.height;
|
|
472
|
-
}
|
|
473
|
-
}, {
|
|
474
|
-
key: "Depth",
|
|
475
|
-
get: function get() {
|
|
476
|
-
var _this$planElement$pla8;
|
|
477
|
-
return (_this$planElement$pla8 = this.planElement.plannerData) === null || _this$planElement$pla8 === void 0 ? void 0 : _this$planElement$pla8.depth;
|
|
478
|
-
}
|
|
479
|
-
}, {
|
|
480
|
-
key: "HasAVL",
|
|
481
|
-
get: function get() {
|
|
482
|
-
var _this$planElement$pla9;
|
|
483
|
-
return (_this$planElement$pla9 = this.planElement.plannerData) === null || _this$planElement$pla9 === void 0 ? void 0 : _this$planElement$pla9.hasAVL;
|
|
484
|
-
}
|
|
485
|
-
}, {
|
|
486
|
-
key: "HasAVR",
|
|
487
|
-
get: function get() {
|
|
488
|
-
var _this$planElement$pla10;
|
|
489
|
-
return (_this$planElement$pla10 = this.planElement.plannerData) === null || _this$planElement$pla10 === void 0 ? void 0 : _this$planElement$pla10.hasAVR;
|
|
490
|
-
}
|
|
491
|
-
}, {
|
|
492
|
-
key: "HasAVO",
|
|
493
|
-
get: function get() {
|
|
494
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVO > 0 ? true : false : false;
|
|
495
|
-
}
|
|
496
|
-
}, {
|
|
497
|
-
key: "HasAVU",
|
|
498
|
-
get: function get() {
|
|
499
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVU > 0 ? true : false : false;
|
|
500
|
-
}
|
|
501
|
-
}, {
|
|
502
|
-
key: "HasAVC",
|
|
503
|
-
get: function get() {
|
|
504
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVC > 0 ? true : false : false;
|
|
505
|
-
}
|
|
506
|
-
}, {
|
|
507
|
-
key: "HasAVN",
|
|
508
|
-
get: function get() {
|
|
509
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVN > 0 ? true : false : false;
|
|
510
|
-
}
|
|
511
|
-
}, {
|
|
512
|
-
key: "HasAVS",
|
|
513
|
-
get: function get() {
|
|
514
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVS > 0 ? true : false : false;
|
|
515
|
-
}
|
|
516
|
-
}, {
|
|
517
|
-
key: "SvgShapeOLF2D",
|
|
518
|
-
get: function get() {
|
|
519
|
-
return this.planElement.svgShapeOLF2D;
|
|
520
|
-
},
|
|
521
|
-
set: function set(shape) {
|
|
522
|
-
this.planElement.svgShapeOLF2D = shape;
|
|
523
|
-
}
|
|
524
|
-
}, {
|
|
525
|
-
key: "SvgShapeOLT2D",
|
|
526
|
-
get: function get() {
|
|
527
|
-
return this.planElement.svgShapeOLT2D;
|
|
528
|
-
},
|
|
529
|
-
set: function set(shape) {
|
|
530
|
-
this.planElement.svgShapeOLT2D = shape;
|
|
531
|
-
}
|
|
532
|
-
}, {
|
|
533
|
-
key: "OLTPolygon",
|
|
534
|
-
get: function get() {
|
|
535
|
-
return this.planElement.oltPolygon;
|
|
536
|
-
},
|
|
537
|
-
set: function set(polygon) {
|
|
538
|
-
this.planElement.oltPolygon = polygon;
|
|
539
|
-
}
|
|
540
|
-
}, {
|
|
541
|
-
key: "OLTTop",
|
|
542
|
-
set: function set(top) {
|
|
543
|
-
this.planElement.oltTop = top / DivaUtils__default["default"].UnitRecalc;
|
|
544
|
-
}
|
|
545
|
-
}, {
|
|
546
|
-
key: "OLTLeft",
|
|
547
|
-
set: function set(left) {
|
|
548
|
-
this.planElement.oltLeft = left / DivaUtils__default["default"].UnitRecalc;
|
|
549
|
-
}
|
|
550
|
-
}, {
|
|
551
|
-
key: "OLTWidth",
|
|
552
|
-
set: function set(width) {
|
|
553
|
-
this.planElement.oltWidth = width / DivaUtils__default["default"].UnitRecalc;
|
|
554
|
-
}
|
|
555
|
-
}, {
|
|
556
|
-
key: "OLTDepth",
|
|
557
|
-
set: function set(depth) {
|
|
558
|
-
this.planElement.oltDepth = depth / DivaUtils__default["default"].UnitRecalc;
|
|
559
|
-
}
|
|
560
|
-
}, {
|
|
561
|
-
key: "setupOLF",
|
|
562
|
-
value: function setupOLF(polygon, olfWidth, olfHeight) {
|
|
563
|
-
this.planElement.olfPolygon = polygon;
|
|
564
|
-
this.planElement.olfDepth = olfHeight;
|
|
565
|
-
this.planElement.olfWidth = olfWidth;
|
|
566
|
-
}
|
|
567
|
-
}, {
|
|
568
|
-
key: "clearOLF",
|
|
569
|
-
value: function clearOLF() {
|
|
570
|
-
this.planElement.olfPolygon = undefined;
|
|
571
|
-
this.planElement.olfDepth = undefined;
|
|
572
|
-
this.planElement.olfWidth = undefined;
|
|
573
|
-
}
|
|
574
|
-
}, {
|
|
575
|
-
key: "getGlobalWidth",
|
|
576
|
-
value: function getGlobalWidth() {
|
|
577
|
-
if (this.HasOLFPolygon) {
|
|
578
|
-
return this.planElement.olfWidth / DivaUtils__default["default"].UnitRecalc;
|
|
579
|
-
}
|
|
580
|
-
return this.Width;
|
|
581
|
-
}
|
|
582
|
-
}, {
|
|
583
|
-
key: "getGlobalDepth",
|
|
584
|
-
value: function getGlobalDepth() {
|
|
585
|
-
if (this.HasOLFPolygon) {
|
|
586
|
-
return this.planElement.olfDepth / DivaUtils__default["default"].UnitRecalc;
|
|
587
|
-
}
|
|
588
|
-
return this.Depth;
|
|
589
|
-
}
|
|
590
|
-
}, {
|
|
591
|
-
key: "HasOLTPolygon",
|
|
592
|
-
get: function get() {
|
|
593
|
-
return this.planElement.oltPolygon != null;
|
|
594
|
-
}
|
|
595
|
-
}, {
|
|
596
|
-
key: "HasOLFPolygon",
|
|
597
|
-
get: function get() {
|
|
598
|
-
return this.planElement.olfPolygon != null;
|
|
599
|
-
}
|
|
600
|
-
}, {
|
|
601
|
-
key: "svgBefore",
|
|
602
|
-
get: function get() {
|
|
603
|
-
var _this$planElement$pla11;
|
|
604
|
-
return (_this$planElement$pla11 = this.planElement.plannerData) === null || _this$planElement$pla11 === void 0 ? void 0 : _this$planElement$pla11.svgBefore;
|
|
605
|
-
},
|
|
606
|
-
set: function set(svg) {
|
|
607
|
-
if (this.planElement.plannerData) this.planElement.plannerData.svgBefore = svg;
|
|
608
|
-
}
|
|
609
|
-
}, {
|
|
610
|
-
key: "svgAfter",
|
|
611
|
-
get: function get() {
|
|
612
|
-
var _this$planElement$pla12;
|
|
613
|
-
return (_this$planElement$pla12 = this.planElement.plannerData) === null || _this$planElement$pla12 === void 0 ? void 0 : _this$planElement$pla12.svgAfter;
|
|
614
|
-
},
|
|
615
|
-
set: function set(svg) {
|
|
616
|
-
if (this.planElement.plannerData) this.planElement.plannerData.svgAfter = svg;
|
|
617
|
-
}
|
|
618
|
-
}, {
|
|
619
|
-
key: "getOLTPolygonWorldPos",
|
|
620
|
-
value: function getOLTPolygonWorldPos() {
|
|
621
|
-
if (!this.planElement.oltPolygon) return [];
|
|
622
|
-
var polygon = [];
|
|
623
|
-
for (var i = 0; i < this.planElement.oltPolygon.length; i++) {
|
|
624
|
-
var localWorldPos = new index.Vector2(this.planElement.oltPolygon[i].x / DivaUtils__default["default"].UnitRecalc, this.planElement.oltPolygon[i].y / DivaUtils__default["default"].UnitRecalc);
|
|
625
|
-
localWorldPos = index.Vector2.rotateOrigin(localWorldPos, this.RotDeg);
|
|
626
|
-
polygon.push(new index.Vector2(this.WorldPosCorner.x + localWorldPos.x, this.WorldPosCorner.z + localWorldPos.y));
|
|
627
|
-
}
|
|
628
|
-
return polygon;
|
|
629
|
-
}
|
|
630
|
-
}, {
|
|
631
|
-
key: "getOLFPolygonWorldPos",
|
|
632
|
-
value: function getOLFPolygonWorldPos() {
|
|
633
|
-
var polygon = [];
|
|
634
|
-
if (!this.planElement.olfPolygon) return [];
|
|
635
|
-
for (var i = 0; i < this.planElement.olfPolygon.length; i++) {
|
|
636
|
-
var localWorldPos = new index.Vector2(this.planElement.olfPolygon[i].x / DivaUtils__default["default"].UnitRecalc, this.planElement.olfPolygon[i].y / DivaUtils__default["default"].UnitRecalc);
|
|
637
|
-
localWorldPos = index.Vector2.rotateOrigin(localWorldPos, this.RotDeg);
|
|
638
|
-
polygon.push(new index.Vector2(this.WorldPosCorner.x + localWorldPos.x, this.WorldPosCorner.z + localWorldPos.y));
|
|
639
|
-
}
|
|
640
|
-
return polygon;
|
|
641
|
-
}
|
|
642
|
-
}, {
|
|
643
|
-
key: "SvgData",
|
|
644
|
-
get: function get() {
|
|
645
|
-
return this.planElement.svgData ? this.planElement.svgData : '';
|
|
646
|
-
},
|
|
647
|
-
set: function set(svgData) {
|
|
648
|
-
this.planElement.svgData = svgData;
|
|
649
|
-
}
|
|
650
|
-
}, {
|
|
651
|
-
key: "SvgDataOLTBase64",
|
|
652
|
-
set: function set(svgData) {
|
|
653
|
-
this.planElement.SvgDataOLTBase64 = svgData;
|
|
654
|
-
}
|
|
655
|
-
}, {
|
|
656
|
-
key: "Layer",
|
|
657
|
-
get: function get() {
|
|
658
|
-
return this.planElement.plannerData.layer;
|
|
659
|
-
}
|
|
660
|
-
}, {
|
|
661
|
-
key: "HasSvgAsHTMLCanvas",
|
|
662
|
-
get: function get() {
|
|
663
|
-
return this.planElement.svgAsHTMLCanvas == undefined ? false : true;
|
|
664
|
-
}
|
|
665
|
-
}, {
|
|
666
|
-
key: "SvgAsHTMLCanvas",
|
|
667
|
-
get: function get() {
|
|
668
|
-
return this.planElement.svgAsHTMLCanvas;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
/** ---------------------------------Getter und setter for the view------------------------- */,
|
|
672
|
-
set: function set(ctx) {
|
|
673
|
-
this.planElement.svgAsHTMLCanvas = ctx;
|
|
674
|
-
}
|
|
675
|
-
}, {
|
|
676
|
-
key: "getArticleCodex",
|
|
677
|
-
value: function getArticleCodex() {
|
|
678
|
-
return this.ArticleCodex;
|
|
679
|
-
}
|
|
680
|
-
}, {
|
|
681
|
-
key: "getPosNr",
|
|
682
|
-
value: function getPosNr() {
|
|
683
|
-
return this.planElement.setPosNr;
|
|
684
|
-
}
|
|
685
|
-
}, {
|
|
686
|
-
key: "getIsDockedAccessoire",
|
|
687
|
-
value: function getIsDockedAccessoire() {
|
|
688
|
-
return this.IsDockedAccessoire;
|
|
689
|
-
}
|
|
690
|
-
}, {
|
|
691
|
-
key: "getIsNotDockedAccessoire",
|
|
692
|
-
value: function getIsNotDockedAccessoire() {
|
|
693
|
-
var _this$planElement$pla13;
|
|
694
|
-
return !!((_this$planElement$pla13 = this.planElement.plannerData) !== null && _this$planElement$pla13 !== void 0 && _this$planElement$pla13.isNotDockedAccessoire);
|
|
695
|
-
}
|
|
696
|
-
}, {
|
|
697
|
-
key: "getParentElementId",
|
|
698
|
-
value: function getParentElementId() {
|
|
699
|
-
var _this$planElement$pla14;
|
|
700
|
-
return (_this$planElement$pla14 = this.planElement.plannerData) === null || _this$planElement$pla14 === void 0 ? void 0 : _this$planElement$pla14.parentElementId;
|
|
701
|
-
}
|
|
702
|
-
}, {
|
|
703
|
-
key: "getElementId",
|
|
704
|
-
value: function getElementId() {
|
|
705
|
-
return this.planElement.elementId;
|
|
706
|
-
}
|
|
707
|
-
}, {
|
|
708
|
-
key: "getBasketId",
|
|
709
|
-
value: function getBasketId() {
|
|
710
|
-
return this.basketId;
|
|
711
|
-
}
|
|
712
|
-
}, {
|
|
713
|
-
key: "getSetId",
|
|
714
|
-
value: function getSetId() {
|
|
715
|
-
return this.planElement.setId;
|
|
716
|
-
}
|
|
717
|
-
}, {
|
|
718
|
-
key: "getWorldPosCorner",
|
|
719
|
-
value: function getWorldPosCorner() {
|
|
720
|
-
return this.WorldPosCorner;
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
/**
|
|
724
|
-
* This function returns the position in world coordinates of the CENTER of the plannerElement
|
|
725
|
-
*/
|
|
726
|
-
}, {
|
|
727
|
-
key: "getWorldPosCenter",
|
|
728
|
-
value: function getWorldPosCenter() {
|
|
729
|
-
return this.WorldPosCenter;
|
|
730
|
-
}
|
|
731
|
-
}, {
|
|
732
|
-
key: "getRotDeg",
|
|
733
|
-
value: function getRotDeg() {
|
|
734
|
-
return this.planElement.rotDeg;
|
|
735
|
-
}
|
|
736
|
-
}, {
|
|
737
|
-
key: "getRotRad",
|
|
738
|
-
value: function getRotRad() {
|
|
739
|
-
return this.planElement.rotDeg * Math.PI / 180;
|
|
740
|
-
}
|
|
741
|
-
}, {
|
|
742
|
-
key: "getHasAVL",
|
|
743
|
-
value: function getHasAVL() {
|
|
744
|
-
return this.planElement.plannerData ? this.planElement.plannerData.hasAVL : false;
|
|
745
|
-
}
|
|
746
|
-
}, {
|
|
747
|
-
key: "getHasAVR",
|
|
748
|
-
value: function getHasAVR() {
|
|
749
|
-
return this.planElement.plannerData ? this.planElement.plannerData.hasAVR : false;
|
|
750
|
-
}
|
|
751
|
-
}, {
|
|
752
|
-
key: "getHasAVO",
|
|
753
|
-
value: function getHasAVO() {
|
|
754
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVO > 0 ? true : false : false;
|
|
755
|
-
}
|
|
756
|
-
}, {
|
|
757
|
-
key: "getHasAVU",
|
|
758
|
-
value: function getHasAVU() {
|
|
759
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVU > 0 ? true : false : false;
|
|
760
|
-
}
|
|
761
|
-
}, {
|
|
762
|
-
key: "getHasAVC",
|
|
763
|
-
value: function getHasAVC() {
|
|
764
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVC > 0 ? true : false : false;
|
|
765
|
-
}
|
|
766
|
-
}, {
|
|
767
|
-
key: "getHasAVN",
|
|
768
|
-
value: function getHasAVN() {
|
|
769
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVN > 0 ? true : false : false;
|
|
770
|
-
}
|
|
771
|
-
}, {
|
|
772
|
-
key: "getHasAVS",
|
|
773
|
-
value: function getHasAVS() {
|
|
774
|
-
return this.planElement.plannerData != undefined ? this.planElement.plannerData.countAVS > 0 ? true : false : false;
|
|
775
|
-
}
|
|
776
|
-
}, {
|
|
777
|
-
key: "getFilterAVL",
|
|
778
|
-
value: function getFilterAVL() {
|
|
779
|
-
var _this$planElement$pla15;
|
|
780
|
-
return this.planElement.plannerData ? (_this$planElement$pla15 = this.planElement.plannerData) === null || _this$planElement$pla15 === void 0 ? void 0 : _this$planElement$pla15.AVLFilter : [];
|
|
781
|
-
}
|
|
782
|
-
}, {
|
|
783
|
-
key: "getFilterAVR",
|
|
784
|
-
value: function getFilterAVR() {
|
|
785
|
-
return this.planElement.plannerData ? this.planElement.plannerData.AVRFilter : [];
|
|
786
|
-
}
|
|
787
|
-
}, {
|
|
788
|
-
key: "getSVGShapeOLF2D",
|
|
789
|
-
value: function getSVGShapeOLF2D() {
|
|
790
|
-
return this.planElement.svgShapeOLF2D;
|
|
791
|
-
}
|
|
792
|
-
}, {
|
|
793
|
-
key: "getSVGShapeOLT2D",
|
|
794
|
-
value: function getSVGShapeOLT2D() {
|
|
795
|
-
return this.planElement.svgShapeOLT2D;
|
|
796
|
-
}
|
|
797
|
-
}, {
|
|
798
|
-
key: "getPlannerType",
|
|
799
|
-
value: function getPlannerType() {
|
|
800
|
-
return this.plannerType;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* Returns the original svg XML
|
|
805
|
-
*/
|
|
806
|
-
}, {
|
|
807
|
-
key: "getSVGData",
|
|
808
|
-
value: function getSVGData() {
|
|
809
|
-
return this.planElement.svgData ? this.planElement.svgData : '';
|
|
810
|
-
}
|
|
811
|
-
}, {
|
|
812
|
-
key: "getWidth",
|
|
813
|
-
value: function getWidth() {
|
|
814
|
-
return this.planElement.plannerData ? this.getGlobalWidth() : -1;
|
|
815
|
-
}
|
|
816
|
-
}, {
|
|
817
|
-
key: "getHeight",
|
|
818
|
-
value: function getHeight() {
|
|
819
|
-
return this.planElement.plannerData ? this.planElement.plannerData.height : -1;
|
|
820
|
-
}
|
|
821
|
-
}, {
|
|
822
|
-
key: "getDepth",
|
|
823
|
-
value: function getDepth() {
|
|
824
|
-
return this.planElement.plannerData ? this.getGlobalDepth() : -1;
|
|
825
|
-
}
|
|
826
|
-
}, {
|
|
827
|
-
key: "getDepthOLT",
|
|
828
|
-
value: function getDepthOLT() {
|
|
829
|
-
return this.Depth ? this.Depth : -1;
|
|
830
|
-
}
|
|
831
|
-
}, {
|
|
832
|
-
key: "getWidthOLT",
|
|
833
|
-
value: function getWidthOLT() {
|
|
834
|
-
return this.Width ? this.Width : -1;
|
|
835
|
-
}
|
|
836
|
-
}, {
|
|
837
|
-
key: "getLayer",
|
|
838
|
-
value: function getLayer() {
|
|
839
|
-
return this.planElement.plannerData ? this.planElement.plannerData.layer : 20;
|
|
840
|
-
}
|
|
841
|
-
}, {
|
|
842
|
-
key: "hasSvgAsHtmlCanvas",
|
|
843
|
-
value: function hasSvgAsHtmlCanvas() {
|
|
844
|
-
return this.planElement.svgAsHTMLCanvas == undefined ? false : true;
|
|
845
|
-
}
|
|
846
|
-
}, {
|
|
847
|
-
key: "getSvgAsHtmlCanvas",
|
|
848
|
-
value: function getSvgAsHtmlCanvas() {
|
|
849
|
-
return this.planElement.svgAsHTMLCanvas;
|
|
850
|
-
}
|
|
851
|
-
}, {
|
|
852
|
-
key: "hasSvgDataOLTBase64",
|
|
853
|
-
value: function hasSvgDataOLTBase64() {
|
|
854
|
-
return this.planElement.SvgDataOLTBase64 != undefined && this.planElement.SvgDataOLTBase64 != '';
|
|
855
|
-
}
|
|
856
|
-
}, {
|
|
857
|
-
key: "getSvgDataOLTBase64",
|
|
858
|
-
value: function getSvgDataOLTBase64() {
|
|
859
|
-
return this.planElement.SvgDataOLTBase64 != undefined ? this.planElement.SvgDataOLTBase64 : '';
|
|
860
|
-
}
|
|
861
|
-
}, {
|
|
862
|
-
key: "getAccessoires",
|
|
863
|
-
value: function getAccessoires() {
|
|
864
|
-
var _this$planElement$pla16;
|
|
865
|
-
return this.planElement.plannerData ? (_this$planElement$pla16 = this.planElement.plannerData) === null || _this$planElement$pla16 === void 0 ? void 0 : _this$planElement$pla16.accessoireList : [];
|
|
866
|
-
}
|
|
867
|
-
}, {
|
|
868
|
-
key: "getSVGsWithFormula",
|
|
869
|
-
value: function getSVGsWithFormula() {
|
|
870
|
-
var _this$planElement$pla17;
|
|
871
|
-
return (_this$planElement$pla17 = this.planElement.plannerData) === null || _this$planElement$pla17 === void 0 ? void 0 : _this$planElement$pla17.svgsWithFormula;
|
|
872
|
-
}
|
|
873
|
-
}, {
|
|
874
|
-
key: "getVaraintValuesInfluencingAVLAVRFilter",
|
|
875
|
-
value: function getVaraintValuesInfluencingAVLAVRFilter() {
|
|
876
|
-
var _this$planElement$pla18;
|
|
877
|
-
return (_this$planElement$pla18 = this.planElement.plannerData) === null || _this$planElement$pla18 === void 0 ? void 0 : _this$planElement$pla18.varaintValuesInfluencingAVLAVRFilter;
|
|
878
|
-
}
|
|
879
|
-
}, {
|
|
880
|
-
key: "getCurrentAccessorires",
|
|
881
|
-
value: function getCurrentAccessorires() {
|
|
882
|
-
var _this$planElement$pla19;
|
|
883
|
-
return this.planElement.plannerData ? (_this$planElement$pla19 = this.planElement.plannerData) === null || _this$planElement$pla19 === void 0 ? void 0 : _this$planElement$pla19.currentAccessorires : [];
|
|
884
|
-
}
|
|
885
|
-
}]);
|
|
886
|
-
}();
|
|
887
|
-
|
|
888
25
|
var LOG$2 = DivaUtils__default["default"].initLog('Planner', 'WEB-PLANNER-LOGIC');
|
|
889
26
|
var SVGUtils = /*#__PURE__*/function () {
|
|
890
27
|
function SVGUtils() {
|
|
@@ -3181,6 +2318,5 @@ var PlannerHandler2D = /*#__PURE__*/function () {
|
|
|
3181
2318
|
}();
|
|
3182
2319
|
var handler2D = new PlannerHandler2D();
|
|
3183
2320
|
|
|
3184
|
-
exports.PlannerElementData = PlannerElementData;
|
|
3185
2321
|
exports.dockingPointHandlerInst = dockingPointHandlerInst;
|
|
3186
2322
|
exports.handler2D = handler2D;
|