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