kitchen-simulator 2.0.56 → 2.0.60
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/es/catalog/holes/window-clear/planner-element.js +2 -2
- package/es/class/item.js +22 -15
- package/es/components/viewer2d/item.js +34 -29
- package/es/components/viewer2d/rulerDist.js +39 -56
- package/es/components/viewer2d/viewer2d.js +5 -8
- package/es/components/viewer3d/front3D.js +3 -2
- package/es/constants.js +11 -1
- package/es/devLiteRenderer.js +84 -63
- package/es/plugins/SVGLoader.js +7 -5
- package/es/utils/isolate-event-handler.js +150 -88
- package/lib/catalog/holes/window-clear/planner-element.js +2 -2
- package/lib/class/item.js +22 -15
- package/lib/components/viewer2d/item.js +34 -29
- package/lib/components/viewer2d/rulerDist.js +39 -56
- package/lib/components/viewer2d/viewer2d.js +5 -8
- package/lib/components/viewer3d/front3D.js +3 -2
- package/lib/constants.js +15 -5
- package/lib/devLiteRenderer.js +83 -62
- package/lib/plugins/SVGLoader.js +7 -5
- package/lib/utils/isolate-event-handler.js +149 -87
- package/package.json +1 -1
|
@@ -4,12 +4,12 @@ import { loadGLTF, scaleObject } from "../../utils/load-obj";
|
|
|
4
4
|
import { OBJTYPE_MESH } from "../../../constants";
|
|
5
5
|
var cached3DWindow = null;
|
|
6
6
|
export default {
|
|
7
|
-
name: 'Window',
|
|
7
|
+
name: 'Clear Window',
|
|
8
8
|
prototype: 'holes',
|
|
9
9
|
info: {
|
|
10
10
|
title: 'Clear',
|
|
11
11
|
tag: ['window'],
|
|
12
|
-
description: 'Window',
|
|
12
|
+
description: 'Clear Window',
|
|
13
13
|
image: '/assets/img/svg/window/Clear.svg',
|
|
14
14
|
url: '/assets/gltf/window_clear.gltf'
|
|
15
15
|
},
|
package/es/class/item.js
CHANGED
|
@@ -30,6 +30,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
30
30
|
value: function create(state, layerID, type, x, y, width, height, rotation, isDuplication) {
|
|
31
31
|
var molding = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : [];
|
|
32
32
|
var isInitialPos = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : false;
|
|
33
|
+
var refItem = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : null;
|
|
33
34
|
var itemID = IDBroker.acquireID();
|
|
34
35
|
var item = state.catalog.factoryElement(type, {
|
|
35
36
|
id: itemID,
|
|
@@ -50,19 +51,25 @@ var Item = /*#__PURE__*/function () {
|
|
|
50
51
|
isInitialPos: isInitialPos ? isInitialPos : false
|
|
51
52
|
}, null, state);
|
|
52
53
|
if (item.category === 'cabinet') {
|
|
53
|
-
|
|
54
|
-
var layer = state.getIn(['scene', 'layers', layerID]);
|
|
55
|
-
var temp = layer.doorStyle || ((_state$doorStyle = state.doorStyle) === null || _state$doorStyle === void 0 ? void 0 : _state$doorStyle.toJS());
|
|
56
|
-
var cds = state.catalog.getIn(['elements', type, 'cds']);
|
|
57
|
-
if (cds) {
|
|
58
|
-
var updatedDoorStyles = _objectSpread(_objectSpread({}, temp.doorStyles), {}, {
|
|
59
|
-
cds: [cds]
|
|
60
|
-
});
|
|
54
|
+
if (isDuplication && refItem) {
|
|
61
55
|
item = item.merge({
|
|
62
|
-
doorStyle:
|
|
63
|
-
doorStyles: updatedDoorStyles
|
|
64
|
-
}))
|
|
56
|
+
doorStyle: refItem.doorStyle
|
|
65
57
|
});
|
|
58
|
+
} else {
|
|
59
|
+
var _state$doorStyle;
|
|
60
|
+
var layer = state.getIn(['scene', 'layers', layerID]);
|
|
61
|
+
var temp = layer.doorStyle || ((_state$doorStyle = state.doorStyle) === null || _state$doorStyle === void 0 ? void 0 : _state$doorStyle.toJS());
|
|
62
|
+
var cds = state.catalog.getIn(['elements', type, 'cds']);
|
|
63
|
+
if (cds) {
|
|
64
|
+
var updatedDoorStyles = _objectSpread(_objectSpread({}, temp.doorStyles), {}, {
|
|
65
|
+
cds: [cds]
|
|
66
|
+
});
|
|
67
|
+
item = item.merge({
|
|
68
|
+
doorStyle: fromJS(_objectSpread(_objectSpread({}, temp), {}, {
|
|
69
|
+
doorStyles: updatedDoorStyles
|
|
70
|
+
}))
|
|
71
|
+
});
|
|
72
|
+
}
|
|
66
73
|
}
|
|
67
74
|
}
|
|
68
75
|
if (item.get('type') === 'cabinet' && item.get('doorStyle').size === 0) {
|
|
@@ -294,7 +301,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
294
301
|
var isrectSect = GeometryUtils.validInterSect(allRect, val);
|
|
295
302
|
if (isrectSect) {
|
|
296
303
|
// Duplicated object has a original object's molding property
|
|
297
|
-
var _this$create = this.create(state, layerID, sceneComponentType, x + width * Math.cos(rotRad), y + width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
|
|
304
|
+
var _this$create = this.create(state, layerID, sceneComponentType, x + width * Math.cos(rotRad), y + width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding, false, myObject),
|
|
298
305
|
stateI = _this$create.updatedState,
|
|
299
306
|
item = _this$create.item;
|
|
300
307
|
duplicatedElement = item;
|
|
@@ -321,7 +328,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
321
328
|
_val.is_corner = allItemRect.cur.is_corner;
|
|
322
329
|
var isRect = GeometryUtils.validInterSect(allRect, _val);
|
|
323
330
|
if (isRect) {
|
|
324
|
-
var _this$create2 = this.create(state, layerID, sceneComponentType, x - width * Math.cos(rotRad), y - width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
|
|
331
|
+
var _this$create2 = this.create(state, layerID, sceneComponentType, x - width * Math.cos(rotRad), y - width * Math.sin(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding, false, myObject),
|
|
325
332
|
_stateI = _this$create2.updatedState,
|
|
326
333
|
_item = _this$create2.item;
|
|
327
334
|
duplicatedElement = _item;
|
|
@@ -348,7 +355,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
348
355
|
_val2.is_corner = allItemRect.cur.is_corner;
|
|
349
356
|
var isRectDown = GeometryUtils.validInterSect(allRect, _val2);
|
|
350
357
|
if (isRectDown) {
|
|
351
|
-
var _this$create3 = this.create(state, layerID, sceneComponentType, x - depth * Math.sin(rotRad), y - depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
|
|
358
|
+
var _this$create3 = this.create(state, layerID, sceneComponentType, x - depth * Math.sin(rotRad), y - depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding, false, myObject),
|
|
352
359
|
_stateI2 = _this$create3.updatedState,
|
|
353
360
|
_item2 = _this$create3.item;
|
|
354
361
|
duplicatedElement = _item2;
|
|
@@ -375,7 +382,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
375
382
|
_val3.is_corner = allItemRect.cur.is_corner;
|
|
376
383
|
var isRectUp = GeometryUtils.validInterSect(allRect, _val3);
|
|
377
384
|
if (isRectUp) {
|
|
378
|
-
var _this$create4 = this.create(state, layerID, sceneComponentType, x + depth * Math.sin(rotRad), y + depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding),
|
|
385
|
+
var _this$create4 = this.create(state, layerID, sceneComponentType, x + depth * Math.sin(rotRad), y + depth * Math.cos(rotRad), 200, 100, rotRad * 180 / Math.PI, true, myObject.molding, false, myObject),
|
|
379
386
|
_stateI3 = _this$create4.updatedState,
|
|
380
387
|
_item3 = _this$create4.item;
|
|
381
388
|
duplicatedElement = _item3;
|
|
@@ -32,7 +32,8 @@ export default function Item(_ref, _ref2) {
|
|
|
32
32
|
var x = item.x,
|
|
33
33
|
y = item.y,
|
|
34
34
|
rotation = item.rotation,
|
|
35
|
-
id = item.id
|
|
35
|
+
id = item.id,
|
|
36
|
+
layoutpos = item.layoutpos;
|
|
36
37
|
var showBaseCabinetMeasure = scene.showBaseCabinetMeasure,
|
|
37
38
|
showWallCabinetMeasure = scene.showWallCabinetMeasure;
|
|
38
39
|
var vertices = layer.vertices;
|
|
@@ -43,6 +44,7 @@ export default function Item(_ref, _ref2) {
|
|
|
43
44
|
var allLineRects;
|
|
44
45
|
var allItemRect;
|
|
45
46
|
var width, height;
|
|
47
|
+
var altitude = item.properties.getIn(['altitude', '_length']);
|
|
46
48
|
var _useState = useState(false),
|
|
47
49
|
_useState2 = _slicedToArray(_useState, 2),
|
|
48
50
|
clockRotateState = _useState2[0],
|
|
@@ -146,33 +148,36 @@ export default function Item(_ref, _ref2) {
|
|
|
146
148
|
// }
|
|
147
149
|
|
|
148
150
|
if (!item.selected) {
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
151
|
+
var detectObjectsAtSameAltitudeFlag = layoutpos === 'Base' ? item.properties.getIn(['altitude', '_length']) <= altitude + tempHeight.get('_length') : item.properties.getIn(['altitude', '_length']) + item.properties.getIn(['height', '_length']) >= altitude;
|
|
152
|
+
if (detectObjectsAtSameAltitudeFlag) {
|
|
153
|
+
var _x = val.pos.x;
|
|
154
|
+
var _y = val.pos.y;
|
|
155
|
+
var rotRad = val.rotRad;
|
|
156
|
+
var w = val.size.width / 2;
|
|
157
|
+
var h = val.size.height / 2;
|
|
158
|
+
var mx = _x - w * Math.cos(rotRad);
|
|
159
|
+
var my = _y - w * Math.sin(rotRad);
|
|
160
|
+
var x0 = mx + h * Math.sin(rotRad);
|
|
161
|
+
var y0 = my - h * Math.cos(rotRad);
|
|
162
|
+
var x3 = mx * 2 - x0;
|
|
163
|
+
var y3 = my * 2 - y0;
|
|
164
|
+
var x1 = _x * 2 - x3;
|
|
165
|
+
var y1 = _y * 2 - y3;
|
|
166
|
+
var x2 = _x * 2 - x0;
|
|
167
|
+
var y2 = _y * 2 - y0;
|
|
168
|
+
rectarray.push({
|
|
169
|
+
rect: [point(x0, y0), point(x1, y1), point(x0, y0), point(x1, y1)]
|
|
170
|
+
});
|
|
171
|
+
rectarray.push({
|
|
172
|
+
rect: [point(x1, y1), point(x2, y2), point(x1, y1), point(x2, y2)]
|
|
173
|
+
});
|
|
174
|
+
rectarray.push({
|
|
175
|
+
rect: [point(x2, y2), point(x3, y3), point(x2, y2), point(x3, y3)]
|
|
176
|
+
});
|
|
177
|
+
rectarray.push({
|
|
178
|
+
rect: [point(x3, y3), point(x0, y0), point(x3, y3), point(x0, y0)]
|
|
179
|
+
});
|
|
180
|
+
}
|
|
176
181
|
}
|
|
177
182
|
});
|
|
178
183
|
|
|
@@ -253,7 +258,7 @@ export default function Item(_ref, _ref2) {
|
|
|
253
258
|
if (GeometryUtils.pointsDistance(p0.x, p0.y, p1.x, p1.y) > GeometryUtils.pointsDistance(p0.x, p0.y, coordinatePoint.x, coordinatePoint.y) && GeometryUtils.pointsDistance(p0.x, p0.y, p1.x, p1.y) > GeometryUtils.pointsDistance(p1.x, p1.y, coordinatePoint.x, coordinatePoint.y)) {
|
|
254
259
|
if (GeometryUtils.pointsDistance(coordinatePoint.x, coordinatePoint.y, center_x, center_y) > GeometryUtils.pointsDistance(centerpoint[0].x, centerpoint[0].y, coordinatePoint.x, coordinatePoint.y)) {
|
|
255
260
|
comparelength.push(GeometryUtils.pointsDistance(centerpoint[0].x, centerpoint[0].y, coordinatePoint.x, coordinatePoint.y));
|
|
256
|
-
a = Math.
|
|
261
|
+
a = Math.min.apply(null, comparelength);
|
|
257
262
|
}
|
|
258
263
|
}
|
|
259
264
|
}
|
|
@@ -66,63 +66,46 @@ export default function RulerDist(_ref) {
|
|
|
66
66
|
textRotation = 180;
|
|
67
67
|
ay = 5;
|
|
68
68
|
}
|
|
69
|
-
if (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
69
|
+
if (distanceText > 0) {
|
|
70
|
+
if (distanceText < 28) {
|
|
71
|
+
return /*#__PURE__*/React.createElement("g", {
|
|
72
|
+
transform: transform
|
|
73
|
+
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("text", {
|
|
74
|
+
x: "0",
|
|
75
|
+
y: "0",
|
|
76
|
+
transform: "translate(".concat(length / 2, ",").concat(ay, ") scale(1, -1) rotate(").concat(textRotation, ")"),
|
|
77
|
+
style: STYLE_TEXT
|
|
78
|
+
}, Math.round(convert(distanceText).from('in').to(layer.unit) * 100) / 100, layer.unit === 'in' ? '"' : layer.unit)));
|
|
79
|
+
} else {
|
|
80
|
+
return /*#__PURE__*/React.createElement("g", {
|
|
81
|
+
transform: transform
|
|
82
|
+
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("text", {
|
|
83
|
+
x: "0",
|
|
84
|
+
y: "0",
|
|
85
|
+
transform: "translate(".concat(length / 2, ",").concat(ay, ") scale(1, -1) rotate(").concat(textRotation, ")"),
|
|
86
|
+
style: STYLE_TEXT
|
|
87
|
+
}, Math.round(convert(distanceText).from('in').to(layer.unit) * 100) / 100, layer.unit === 'in' ? '"' : layer.unit)), /*#__PURE__*/React.createElement("line", {
|
|
88
|
+
x1: "2",
|
|
89
|
+
y1: "0",
|
|
90
|
+
x2: (length - textLength) / 2 < 0 ? 0 : (length - textLength) / 2,
|
|
91
|
+
y2: "0",
|
|
92
|
+
style: STYLE
|
|
93
|
+
}), /*#__PURE__*/React.createElement("polygon", {
|
|
94
|
+
points: "1, 0, 4.5, -2, 4.5, 2 ",
|
|
95
|
+
style: STYLE
|
|
96
|
+
}), /*#__PURE__*/React.createElement("line", {
|
|
97
|
+
x1: (length + textLength) / 2 < 0 ? 0 : (length + textLength) / 2 < length ? (length + textLength) / 2 : length,
|
|
98
|
+
y1: "0",
|
|
99
|
+
x2: length,
|
|
100
|
+
y2: "0",
|
|
101
|
+
style: STYLE
|
|
102
|
+
}), /*#__PURE__*/React.createElement("polygon", {
|
|
103
|
+
points: "".concat(length - 1, ", 0, ").concat(length - 4.5, ", 2, ").concat(length - 4.5, ", -2"),
|
|
104
|
+
style: STYLE
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
99
107
|
} else {
|
|
100
|
-
return
|
|
101
|
-
transform: transform
|
|
102
|
-
}, /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("text", {
|
|
103
|
-
x: "0",
|
|
104
|
-
y: "0",
|
|
105
|
-
transform: "translate(".concat(length / 2, ",").concat(ay, ") scale(1, -1) rotate(").concat(textRotation, ")"),
|
|
106
|
-
style: STYLE_TEXT
|
|
107
|
-
}, Math.round(convert(distanceText).from('in').to(layer.unit) * 100) / 100, layer.unit === 'in' ? '"' : layer.unit)), /*#__PURE__*/React.createElement("line", {
|
|
108
|
-
x1: "2",
|
|
109
|
-
y1: "0",
|
|
110
|
-
x2: (length - textLength) / 2 < 0 ? 0 : (length - textLength) / 2,
|
|
111
|
-
y2: "0",
|
|
112
|
-
style: STYLE
|
|
113
|
-
}), /*#__PURE__*/React.createElement("polygon", {
|
|
114
|
-
points: "1, 0, 4.5, -2, 4.5, 2 ",
|
|
115
|
-
style: STYLE
|
|
116
|
-
}), /*#__PURE__*/React.createElement("line", {
|
|
117
|
-
x1: (length + textLength) / 2 < 0 ? 0 : (length + textLength) / 2 < length ? (length + textLength) / 2 : length,
|
|
118
|
-
y1: "0",
|
|
119
|
-
x2: length,
|
|
120
|
-
y2: "0",
|
|
121
|
-
style: STYLE
|
|
122
|
-
}), /*#__PURE__*/React.createElement("polygon", {
|
|
123
|
-
points: "".concat(length - 1, ", 0, ").concat(length - 4.5, ", 2, ").concat(length - 4.5, ", -2"),
|
|
124
|
-
style: STYLE
|
|
125
|
-
}));
|
|
108
|
+
return null;
|
|
126
109
|
}
|
|
127
110
|
}
|
|
128
111
|
RulerDist.propTypes = {
|
|
@@ -1243,12 +1243,9 @@ export default function Viewer2D(_ref, _ref2) {
|
|
|
1243
1243
|
break;
|
|
1244
1244
|
}
|
|
1245
1245
|
if (internalType) {
|
|
1246
|
-
var
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
_currentObject = state.getIn(['scene', 'layers', layerID, elementData === null || elementData === void 0 ? void 0 : elementData.prototype, elementData === null || elementData === void 0 ? void 0 : elementData.id]);
|
|
1250
|
-
if (internalType === INTERNAL_EVENT_SELECT_ELEMENT && ((_currentObject2 = _currentObject) === null || _currentObject2 === void 0 ? void 0 : _currentObject2.prototype) === 'items' && draggingDistance > constants.EPSILON) internalType = INTERNAL_EVENT_DRAG_ELEMENT;
|
|
1251
|
-
} else if (draggingDistance > constants.EPSILON) {
|
|
1246
|
+
var _currentObject2;
|
|
1247
|
+
var _currentObject = state.getIn(['scene', 'layers', layerID, elementData === null || elementData === void 0 ? void 0 : elementData.prototype, elementData === null || elementData === void 0 ? void 0 : elementData.id]);
|
|
1248
|
+
if (internalType === INTERNAL_EVENT_SELECT_ELEMENT && ((_currentObject2 = _currentObject) === null || _currentObject2 === void 0 ? void 0 : _currentObject2.prototype) === 'items' && draggingDistance > constants.EPSILON) internalType = INTERNAL_EVENT_DRAG_ELEMENT;else if (internalType === INTERNAL_EVENT_DRAW_ELEMENT || draggingDistance > constants.EPSILON) {
|
|
1252
1249
|
var elementID = state.getIn(['scene', 'layers', layerID, 'selected', elementPrototype]).first();
|
|
1253
1250
|
_currentObject = state.getIn(['scene', 'layers', layerID, elementPrototype, elementID]);
|
|
1254
1251
|
}
|
|
@@ -1289,10 +1286,10 @@ export default function Viewer2D(_ref, _ref2) {
|
|
|
1289
1286
|
if (_zoomValue > constants.MAX_ZOOM_IN_SCALE) return;
|
|
1290
1287
|
if (_zoomValue < 0 || Number.isNaN(_zoomValue)) return;
|
|
1291
1288
|
if (rulerEdit !== null && value.startX && value.startY || value.lastAction === 'zoom') {
|
|
1292
|
-
var _rulerEdit = document.getElementById('ruler_numberInput'),
|
|
1289
|
+
var _rulerEdit = document.getElementById('ruler_numberInput') && document.getElementById('ruler_numberInput'),
|
|
1293
1290
|
_rect;
|
|
1294
1291
|
if (rulerEditID !== null) {
|
|
1295
|
-
_rect = document.getElementById(rulerEditID);
|
|
1292
|
+
_rect = document.getElementById(rulerEditID) && document.getElementById(rulerEditID);
|
|
1296
1293
|
}
|
|
1297
1294
|
var bbox;
|
|
1298
1295
|
if (_rect && _rulerEdit) {
|
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
2
2
|
import React, { useState, useEffect } from 'react';
|
|
3
3
|
import Viewer3D from "./viewer3d";
|
|
4
4
|
import State3D from "./ruler-utils/state3D";
|
|
5
|
+
import { isEmpty } from "../viewer2d/utils";
|
|
5
6
|
var k = 0;
|
|
6
7
|
export default function Front3D(_ref, _ref2) {
|
|
7
8
|
var width = _ref.width,
|
|
@@ -26,9 +27,9 @@ export default function Front3D(_ref, _ref2) {
|
|
|
26
27
|
setToolbar('');
|
|
27
28
|
};
|
|
28
29
|
useEffect(function () {
|
|
29
|
-
document.getElementById('front').addEventListener('mouseup', mouseUpEvent);
|
|
30
|
+
if (!isEmpty(document.getElementById('front'))) document.getElementById('front').addEventListener('mouseup', mouseUpEvent);
|
|
30
31
|
return function () {
|
|
31
|
-
document.getElementById('front').removeEventListener('mouseup', mouseUpEvent);
|
|
32
|
+
if (!isEmpty(document.getElementById('front'))) document.getElementById('front').removeEventListener('mouseup', mouseUpEvent);
|
|
32
33
|
};
|
|
33
34
|
}, []);
|
|
34
35
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("svg", {
|
package/es/constants.js
CHANGED
|
@@ -653,7 +653,7 @@ export var PROJECT_SETTING_OPTION = {
|
|
|
653
653
|
CHANGE_WINDOW_DOOR_MEASURE: CHANGE_WINDOW_DOOR_MEASURE
|
|
654
654
|
};
|
|
655
655
|
export var HOLE_NAMES = {
|
|
656
|
-
WINDOW_CLEAR: 'Window',
|
|
656
|
+
WINDOW_CLEAR: 'Clear Window',
|
|
657
657
|
WINDOW_CROSS: 'Cross Window',
|
|
658
658
|
WINDOW_DOUBLE_HUNG: 'Double Hung Window',
|
|
659
659
|
WINDOW_VERTICAL: 'window-vertical',
|
|
@@ -698,6 +698,15 @@ export var PROP_ALTITUDE = 'altitude';
|
|
|
698
698
|
export var PROP_RESIZE_WIDTH = 'width';
|
|
699
699
|
export var PROP_RESIZE_HEIGHT = 'height';
|
|
700
700
|
export var PROP_RESIZE_DEPTH = 'depth';
|
|
701
|
+
|
|
702
|
+
// finishing typs
|
|
703
|
+
export var FINISHING_TYPE = {
|
|
704
|
+
COUNTER_TOP: 'counterTop',
|
|
705
|
+
DOOR_HANDLE: 'doorHandle',
|
|
706
|
+
WALL_COLOR: 'wallColor',
|
|
707
|
+
FLOOR_STYLE: 'floorStyle',
|
|
708
|
+
BACKSPLASH: 'backsplash'
|
|
709
|
+
};
|
|
701
710
|
export var MAX_ZOOM_IN_SCALE = Infinity;
|
|
702
711
|
|
|
703
712
|
// external event type
|
|
@@ -729,6 +738,7 @@ export var EXTERNAL_EVENT_DELETE_ELEMENT = 'EXTERNAL_EVENT_DELETE_ELEMENT';
|
|
|
729
738
|
export var EXTERNAL_EVENT_UPDATE_ATTRIBUTE = 'EXTERNAL_EVENT_UPDATE_ATTRIBUTE'; // update the element's attributes (distance, rotation...) in the property window
|
|
730
739
|
export var EXTERNAL_EVENT_UPDATE_PROPERTY = 'EXTERNAL_EVENT_UPDATE_PROPERTY'; // update the element's property (flip_doorhandle, open_doors...) in the property window
|
|
731
740
|
export var EXTERNAL_EVENT_REPLACE_CABINET = 'EXTERNAL_EVENT_REPLACE_CABINET';
|
|
741
|
+
export var EXTERNAL_EVENT_SET_FINISHING = 'EXTERNAL_EVENT_SET_FINISHING'; // set finishing(wallColor, floorStyle, doorHandle, backsplash, counterTop)
|
|
732
742
|
|
|
733
743
|
// internal event type
|
|
734
744
|
export var INTERNAL_EVENT_UNSELECT_ALL = 'INTERNAL_EVENT_UNSELECT_ALL';
|