kitchen-simulator 1.1.1-test.3 → 1.1.1-test.31
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/KitchenConfigurator.js +10 -10
- package/es/KitchenConfiguratorApp.js +14 -14
- package/es/actions/area-actions.js +1 -1
- package/es/actions/export.js +10 -10
- package/es/actions/groups-actions.js +1 -1
- package/es/actions/holes-actions.js +1 -1
- package/es/actions/items-actions.js +1 -1
- package/es/actions/lines-actions.js +1 -1
- package/es/actions/project-actions.js +1 -1
- package/es/actions/scene-actions.js +1 -1
- package/es/actions/vertices-actions.js +1 -1
- package/es/actions/viewer2d-actions.js +1 -1
- package/es/actions/viewer3d-actions.js +1 -1
- package/es/catalog/areas/area/planner-element.js +6 -6
- package/es/catalog/catalog.js +3 -3
- package/es/catalog/factories/area-factory-3d.js +1 -1
- package/es/catalog/factories/area-factory.js +3 -3
- package/es/catalog/factories/export.js +2 -2
- package/es/catalog/factories/wall-factory-3d.js +5 -5
- package/es/catalog/factories/wall-factory.js +7 -6
- package/es/catalog/holes/door-closet/planner-element.js +2 -2
- package/es/catalog/holes/door-exterior/planner-element.js +2 -2
- package/es/catalog/holes/door-interior/planner-element.js +2 -2
- package/es/catalog/holes/door-sliding/planner-element.js +2 -2
- package/es/catalog/holes/doorway-framed/planner-element.js +2 -2
- package/es/catalog/holes/export.js +13 -13
- package/es/catalog/holes/window-clear/planner-element.js +2 -2
- package/es/catalog/holes/window-cross/planner-element.js +2 -2
- package/es/catalog/holes/window-double-hung/planner-element.js +2 -2
- package/es/catalog/holes/window-vertical/planner-element.js +2 -2
- package/es/catalog/lines/wall/planner-element.js +10 -10
- package/es/catalog/molding/molding-dcm/planner-element.js +1 -1
- package/es/catalog/molding/molding-fbm/planner-element.js +1 -1
- package/es/catalog/molding/molding-lrm/planner-element.js +1 -1
- package/es/catalog/properties/export.js +9 -9
- package/es/catalog/properties/property-checkbox.js +64 -19
- package/es/catalog/properties/property-color.js +2 -2
- package/es/catalog/properties/property-enum.js +51 -9
- package/es/catalog/properties/property-lenght-measure.js +4 -4
- package/es/catalog/properties/property-length-measure.js +58 -9
- package/es/catalog/properties/property-length-measure_hole.js +4 -4
- package/es/catalog/properties/property-number.js +2 -2
- package/es/catalog/properties/property-read-only.js +2 -2
- package/es/catalog/properties/property-string.js +2 -2
- package/es/catalog/properties/property-toggle.js +2 -2
- package/es/catalog/utils/geom-utils.js +1 -1
- package/es/catalog/utils/item-loader.js +6 -6
- package/es/catalog/utils/load-obj.js +1 -1
- package/es/catalog/utils/mtl-loader.js +2 -1
- package/es/catalog/utils/obj-loader.js +2 -1
- package/es/class/area.js +2 -2
- package/es/class/export.js +10 -10
- package/es/class/group.js +4 -4
- package/es/class/guide.js +1 -1
- package/es/class/hole.js +5 -6
- package/es/class/item.js +10 -12
- package/es/class/layer.js +4 -4
- package/es/class/line.js +4 -4
- package/es/class/project.js +8 -8
- package/es/class/vertex.js +5 -5
- package/es/components/content.js +6 -5
- package/es/components/export.js +3 -3
- package/es/components/style/button.js +1 -1
- package/es/components/style/cancel-button.js +1 -1
- package/es/components/style/content-title.js +1 -1
- package/es/components/style/delete-button.js +2 -2
- package/es/components/style/export.js +14 -14
- package/es/components/style/form-color-input.js +1 -1
- package/es/components/style/form-number-input.js +32 -8
- package/es/components/style/form-number-input_2.js +2 -2
- package/es/components/style/form-select.js +56 -8
- package/es/components/style/form-slider.js +1 -1
- package/es/components/style/form-submit-button.js +2 -2
- package/es/components/style/form-text-input.js +31 -12
- package/es/components/viewer2d/area.js +2 -2
- package/es/components/viewer2d/export.js +14 -14
- package/es/components/viewer2d/grids/grids.js +1 -1
- package/es/components/viewer2d/group.js +2 -2
- package/es/components/viewer2d/item.js +5 -5
- package/es/components/viewer2d/layer.js +4 -4
- package/es/components/viewer2d/line.js +6 -9
- package/es/components/viewer2d/ruler.js +3 -3
- package/es/components/viewer2d/rulerX.js +1 -1
- package/es/components/viewer2d/rulerY.js +1 -1
- package/es/components/viewer2d/scene.js +2 -2
- package/es/components/viewer2d/snap.js +1 -1
- package/es/components/viewer2d/state.js +3 -3
- package/es/components/viewer2d/utils.js +2 -2
- package/es/components/viewer2d/vertex.js +1 -1
- package/es/components/viewer2d/viewer2d.js +9 -9
- package/es/components/viewer3d/front3D.js +2 -2
- package/es/components/viewer3d/grid-creator.js +2 -2
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +1 -1
- package/es/components/viewer3d/grids/grid-streak.js +1 -1
- package/es/components/viewer3d/grids/grid-vertical-streak.js +1 -1
- package/es/components/viewer3d/libs/mtl-loader.js +1 -1
- package/es/components/viewer3d/libs/obj-loader.js +1 -1
- package/es/components/viewer3d/libs/orbit-controls.js +5 -4
- package/es/components/viewer3d/libs/pointer-lock-controls.js +4 -3
- package/es/components/viewer3d/pointer-lock-navigation.js +1 -1
- package/es/components/viewer3d/ruler-utils/itemRect.js +1 -1
- package/es/components/viewer3d/ruler-utils/layer3D.js +5 -5
- package/es/components/viewer3d/ruler-utils/ruler3D.js +1 -1
- package/es/components/viewer3d/ruler-utils/scene3D.js +3 -4
- package/es/components/viewer3d/ruler-utils/state3D.js +1 -1
- package/es/components/viewer3d/scene-creator.js +10 -10
- package/es/components/viewer3d/viewer3d-first-person.js +5 -5
- package/es/components/viewer3d/viewer3d.js +14 -16
- package/es/index.js +14 -14
- package/es/models.js +4 -4
- package/es/plugins/autosave.js +1 -1
- package/es/plugins/console-debugger.js +1 -1
- package/es/plugins/export.js +3 -3
- package/es/plugins/keyboard.js +2 -2
- package/es/reducers/areas-reducer.js +2 -2
- package/es/reducers/export.js +11 -11
- package/es/reducers/groups-reducer.js +3 -3
- package/es/reducers/holes-reducer.js +3 -3
- package/es/reducers/items-reducer.js +3 -6
- package/es/reducers/lines-reducer.js +3 -3
- package/es/reducers/project-reducer.js +3 -3
- package/es/reducers/reducer.js +3 -3
- package/es/reducers/scene-reducer.js +3 -3
- package/es/reducers/user-reducer.js +1 -2
- package/es/reducers/vertices-reducer.js +3 -3
- package/es/reducers/viewer2d-reducer.js +1 -1
- package/es/reducers/viewer3d-reducer.js +3 -3
- package/es/styles/export.js +1 -1
- package/es/translator/translator.js +3 -3
- package/es/utils/export.js +11 -11
- package/es/utils/geometry.js +5 -5
- package/es/utils/get-edges-of-subgraphs.js +2 -1
- package/es/utils/graph-cycles.js +2 -3
- package/es/utils/graph-inner-cycles.js +3 -3
- package/es/utils/graph.js +2 -1
- package/es/utils/helper.js +3 -71
- package/es/utils/molding.js +5 -5
- package/es/utils/snap-scene.js +2 -2
- package/es/utils/snap.js +1 -1
- package/lib/KitchenConfigurator.js +20 -20
- package/lib/KitchenConfiguratorApp.js +34 -34
- package/lib/catalog/areas/area/planner-element.js +7 -7
- package/lib/catalog/factories/wall-factory-3d.js +1 -1
- package/lib/catalog/factories/wall-factory.js +1 -1
- package/lib/catalog/holes/door-closet/planner-element.js +1 -1
- package/lib/catalog/holes/door-exterior/planner-element.js +1 -1
- package/lib/catalog/holes/door-interior/planner-element.js +1 -1
- package/lib/catalog/holes/door-sliding/planner-element.js +1 -1
- package/lib/catalog/holes/doorway-framed/planner-element.js +1 -1
- package/lib/catalog/holes/export.js +13 -13
- package/lib/catalog/holes/window-clear/planner-element.js +1 -1
- package/lib/catalog/holes/window-cross/planner-element.js +1 -1
- package/lib/catalog/holes/window-double-hung/planner-element.js +1 -1
- package/lib/catalog/holes/window-vertical/planner-element.js +1 -1
- package/lib/catalog/lines/wall/planner-element.js +11 -11
- package/lib/catalog/properties/property-checkbox.js +64 -19
- package/lib/catalog/properties/property-enum.js +49 -7
- package/lib/catalog/properties/property-length-measure.js +55 -6
- package/lib/catalog/utils/geom-utils.js +1 -1
- package/lib/catalog/utils/item-loader.js +4 -6
- package/lib/catalog/utils/load-obj.js +1 -1
- package/lib/catalog/utils/mtl-loader.js +6 -2
- package/lib/catalog/utils/obj-loader.js +6 -2
- package/lib/class/item.js +3 -5
- package/lib/class/line.js +1 -1
- package/lib/class/vertex.js +1 -1
- package/lib/components/content.js +1 -0
- package/lib/components/style/form-number-input.js +30 -6
- package/lib/components/style/form-select.js +54 -8
- package/lib/components/style/form-text-input.js +30 -12
- package/lib/components/viewer2d/line.js +3 -6
- package/lib/components/viewer2d/scene.js +1 -1
- package/lib/components/viewer2d/viewer2d.js +1 -3
- package/lib/components/viewer3d/libs/mtl-loader.js +5 -1
- package/lib/components/viewer3d/libs/obj-loader.js +5 -1
- package/lib/components/viewer3d/libs/orbit-controls.js +9 -4
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +8 -3
- package/lib/components/viewer3d/ruler-utils/scene3D.js +1 -2
- package/lib/components/viewer3d/scene-creator.js +1 -1
- package/lib/components/viewer3d/viewer3d.js +5 -6
- package/lib/reducers/user-reducer.js +0 -1
- package/lib/utils/get-edges-of-subgraphs.js +7 -1
- package/lib/utils/graph-cycles.js +9 -9
- package/lib/utils/graph.js +9 -3
- package/lib/utils/helper.js +2 -70
- package/package.json +15 -50
|
@@ -1,23 +1,60 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
3
2
|
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; }
|
|
4
3
|
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; }
|
|
5
4
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
9
7
|
import React from 'react';
|
|
10
8
|
import PropTypes from 'prop-types';
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
import { DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
10
|
+
var styles = {
|
|
11
|
+
flipWrapper: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
margin: '15px 0',
|
|
15
|
+
justifyContent: 'space-between'
|
|
16
|
+
},
|
|
17
|
+
flipTitle: {
|
|
18
|
+
marginRight: 'auto',
|
|
19
|
+
color: SECONDARY_PURPLE_COLOR,
|
|
20
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
21
|
+
fontSize: 16,
|
|
22
|
+
fontWeight: 600,
|
|
23
|
+
lineHeight: '18px',
|
|
24
|
+
textAlign: 'left'
|
|
25
|
+
},
|
|
26
|
+
flipDescription: {
|
|
27
|
+
marginRight: 'auto',
|
|
28
|
+
color: TEXT_COLOR_NEUTRAL_0,
|
|
29
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
30
|
+
fontSize: 13,
|
|
31
|
+
fontWeight: 400,
|
|
32
|
+
lineHeight: '18px',
|
|
33
|
+
textAlign: 'left'
|
|
34
|
+
},
|
|
35
|
+
flipInfoWrapper: {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
flexDirection: 'column'
|
|
38
|
+
},
|
|
39
|
+
flipToggle: {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
position: 'relative',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
justifyContent: 'center',
|
|
44
|
+
fontSize: 14,
|
|
45
|
+
cursor: 'pointer',
|
|
46
|
+
userSelect: 'none'
|
|
47
|
+
},
|
|
48
|
+
flipToggleIcon: {
|
|
49
|
+
top: 0,
|
|
50
|
+
position: 'absolute'
|
|
51
|
+
},
|
|
52
|
+
flipToggleIconImg: {
|
|
53
|
+
fontSize: '1.4rem',
|
|
54
|
+
boxSizing: 'border-box',
|
|
55
|
+
borderRadius: '50%'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
21
58
|
export default function PropertyCheckbox(_ref) {
|
|
22
59
|
var value = _ref.value,
|
|
23
60
|
onUpdate = _ref.onUpdate,
|
|
@@ -38,10 +75,18 @@ export default function PropertyCheckbox(_ref) {
|
|
|
38
75
|
} : {
|
|
39
76
|
right: 0
|
|
40
77
|
};
|
|
41
|
-
return /*#__PURE__*/React.createElement(
|
|
42
|
-
style:
|
|
78
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
79
|
+
style: styles.flipWrapper
|
|
80
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
style: styles.flipInfoWrapper
|
|
82
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
83
|
+
style: styles.flipTitle
|
|
84
|
+
}, configs.label), configs.description && /*#__PURE__*/React.createElement("span", {
|
|
85
|
+
style: styles.flipDescription
|
|
86
|
+
}, configs.description)), /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
style: _objectSpread(_objectSpread({}, styles.flipToggle), {}, {
|
|
43
88
|
color: 'black'
|
|
44
|
-
},
|
|
89
|
+
}),
|
|
45
90
|
onClick: function onClick(e) {
|
|
46
91
|
return update(!value);
|
|
47
92
|
}
|
|
@@ -51,14 +96,14 @@ export default function PropertyCheckbox(_ref) {
|
|
|
51
96
|
width: '55px',
|
|
52
97
|
height: '30px'
|
|
53
98
|
}
|
|
54
|
-
}), /*#__PURE__*/React.createElement(
|
|
55
|
-
style: _objectSpread({}, activeStyle)
|
|
99
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
100
|
+
style: _objectSpread(_objectSpread({}, styles.flipToggleIcon), activeStyle)
|
|
56
101
|
}, /*#__PURE__*/React.createElement("img", {
|
|
57
102
|
src: "/assets/img/svg/bottombar/".concat(value != 0 ? '2d3d_button_active.svg' : '2d3d_button.svg'),
|
|
58
|
-
style: {
|
|
103
|
+
style: _objectSpread({
|
|
59
104
|
width: '30px',
|
|
60
105
|
height: '30px'
|
|
61
|
-
}
|
|
106
|
+
}, styles.flipToggleIconImg)
|
|
62
107
|
}))));
|
|
63
108
|
}
|
|
64
109
|
PropertyCheckbox.propTypes = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { FormLabel, FormColorInput } from
|
|
4
|
-
import PropertyStyle from
|
|
3
|
+
import { FormLabel, FormColorInput } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyColor(_ref) {
|
|
6
6
|
var value = _ref.value,
|
|
7
7
|
onUpdate = _ref.onUpdate,
|
|
@@ -1,20 +1,45 @@
|
|
|
1
|
-
var _templateObject, _templateObject2;
|
|
2
1
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
3
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
3
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
5
4
|
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
6
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
9
7
|
import React from 'react';
|
|
10
8
|
import PropTypes from 'prop-types';
|
|
11
9
|
import { Seq } from 'immutable';
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
import { FormSelect } from "../../components/style/export";
|
|
11
|
+
import { DEFAULT_FONT_FAMILY, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
12
|
+
var styles = {
|
|
13
|
+
enumWrapper: {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
marginTop: 3
|
|
17
|
+
},
|
|
18
|
+
enumTitle: function enumTitle(fontSize) {
|
|
19
|
+
return {
|
|
20
|
+
marginRight: 'auto',
|
|
21
|
+
width: 110,
|
|
22
|
+
color: TEXT_COLOR_NEUTRAL_0,
|
|
23
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
24
|
+
fontSize: fontSize,
|
|
25
|
+
fontWeight: 400,
|
|
26
|
+
lineHeight: '15px',
|
|
27
|
+
textAlign: 'left'
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Responsive font size logic
|
|
33
|
+
function getFontSize() {
|
|
34
|
+
if (typeof window !== 'undefined') {
|
|
35
|
+
var w = window.innerWidth;
|
|
36
|
+
if (w <= 1024) return 11;
|
|
37
|
+
if (w <= 1366) return 13;
|
|
38
|
+
if (w <= 1440) return 16;
|
|
39
|
+
return 16;
|
|
40
|
+
}
|
|
41
|
+
return 13;
|
|
42
|
+
}
|
|
18
43
|
export default function PropertyEnum(_ref) {
|
|
19
44
|
var value = _ref.value,
|
|
20
45
|
onUpdate = _ref.onUpdate,
|
|
@@ -30,7 +55,24 @@ export default function PropertyEnum(_ref) {
|
|
|
30
55
|
}
|
|
31
56
|
return onUpdate(val);
|
|
32
57
|
};
|
|
33
|
-
|
|
58
|
+
var _React$useState = React.useState(getFontSize()),
|
|
59
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
60
|
+
fontSize = _React$useState2[0],
|
|
61
|
+
setFontSize = _React$useState2[1];
|
|
62
|
+
React.useEffect(function () {
|
|
63
|
+
function handleResize() {
|
|
64
|
+
setFontSize(getFontSize());
|
|
65
|
+
}
|
|
66
|
+
window.addEventListener('resize', handleResize);
|
|
67
|
+
return function () {
|
|
68
|
+
return window.removeEventListener('resize', handleResize);
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
style: styles.enumWrapper
|
|
73
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
74
|
+
style: styles.enumTitle(fontSize)
|
|
75
|
+
}, configs.label), /*#__PURE__*/React.createElement(FormSelect, {
|
|
34
76
|
value: value,
|
|
35
77
|
onChange: function onChange(event) {
|
|
36
78
|
return update(event.target.value);
|
|
@@ -4,12 +4,12 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS, UNITS_LENGTH, UNIT_INCH } from
|
|
7
|
+
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS, UNITS_LENGTH, UNIT_INCH } from "./../../constants";
|
|
8
8
|
import convert from 'convert-units';
|
|
9
|
-
import { FormLabel, FormNumberInput, FormSelect } from
|
|
9
|
+
import { FormLabel, FormNumberInput, FormSelect } from "../../components/style/export";
|
|
10
10
|
import { Map } from 'immutable';
|
|
11
|
-
import { toFixedFloat } from
|
|
12
|
-
import PropertyStyle from
|
|
11
|
+
import { toFixedFloat } from "../../utils/math";
|
|
12
|
+
import PropertyStyle from "./shared-property-style";
|
|
13
13
|
var internalTableStyle = {
|
|
14
14
|
borderCollapse: 'collapse'
|
|
15
15
|
};
|
|
@@ -1,19 +1,51 @@
|
|
|
1
1
|
var _excluded = ["hook", "label"];
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
4
9
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
10
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
6
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
7
11
|
import React from 'react';
|
|
8
12
|
import PropTypes from 'prop-types';
|
|
9
|
-
import {
|
|
13
|
+
import { BASE_CABINET_LAYOUTPOS, DEFAULT_FONT_FAMILY, TALL_CABINET_LAYOUTPOS, TEXT_COLOR_NEUTRAL_0, UNIT_CENTIMETER, UNIT_INCH } from "../../constants";
|
|
10
14
|
import convert from 'convert-units';
|
|
11
|
-
import {
|
|
15
|
+
import { FormNumberInput } from "../../components/style/export";
|
|
12
16
|
import { Map } from 'immutable';
|
|
13
|
-
import { toFixedFloat } from
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
import { toFixedFloat } from "../../utils/math";
|
|
18
|
+
var styles = {
|
|
19
|
+
distanceFloorWrapper: {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
marginTop: 3
|
|
23
|
+
},
|
|
24
|
+
distanceFloorTitle: function distanceFloorTitle(fontSize) {
|
|
25
|
+
return {
|
|
26
|
+
marginRight: 'auto',
|
|
27
|
+
width: 110,
|
|
28
|
+
color: TEXT_COLOR_NEUTRAL_0,
|
|
29
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
30
|
+
fontSize: fontSize,
|
|
31
|
+
fontWeight: 400,
|
|
32
|
+
lineHeight: '15px',
|
|
33
|
+
textAlign: 'left'
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Responsive font size logic
|
|
39
|
+
function getFontSize() {
|
|
40
|
+
if (typeof window !== 'undefined') {
|
|
41
|
+
var w = window.innerWidth;
|
|
42
|
+
if (w <= 1024) return 11;
|
|
43
|
+
if (w <= 1366) return 13;
|
|
44
|
+
if (w <= 1440) return 16;
|
|
45
|
+
return 16;
|
|
46
|
+
}
|
|
47
|
+
return 13;
|
|
48
|
+
}
|
|
17
49
|
export default function PropertyLengthMeasure(_ref, _ref2) {
|
|
18
50
|
var value = _ref.value,
|
|
19
51
|
onUpdate = _ref.onUpdate,
|
|
@@ -58,7 +90,24 @@ export default function PropertyLengthMeasure(_ref, _ref2) {
|
|
|
58
90
|
}
|
|
59
91
|
return onUpdate(merged);
|
|
60
92
|
};
|
|
61
|
-
|
|
93
|
+
var _React$useState = React.useState(getFontSize()),
|
|
94
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
95
|
+
fontSize = _React$useState2[0],
|
|
96
|
+
setFontSize = _React$useState2[1];
|
|
97
|
+
React.useEffect(function () {
|
|
98
|
+
function handleResize() {
|
|
99
|
+
setFontSize(getFontSize());
|
|
100
|
+
}
|
|
101
|
+
window.addEventListener('resize', handleResize);
|
|
102
|
+
return function () {
|
|
103
|
+
return window.removeEventListener('resize', handleResize);
|
|
104
|
+
};
|
|
105
|
+
}, []);
|
|
106
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
style: styles.distanceFloorWrapper
|
|
108
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
109
|
+
style: styles.distanceFloorTitle(fontSize)
|
|
110
|
+
}, label), /*#__PURE__*/React.createElement(FormNumberInput, _extends({
|
|
62
111
|
disabled: type === TALL_CABINET_LAYOUTPOS,
|
|
63
112
|
value: convert(_length).from('in').to(unit),
|
|
64
113
|
onChange: function onChange(event) {
|
|
@@ -4,12 +4,12 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { UNITS_LENGTH, UNIT_INCH, UNIT_CENTIMETER, BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS } from
|
|
7
|
+
import { UNITS_LENGTH, UNIT_INCH, UNIT_CENTIMETER, BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
8
8
|
import convert from 'convert-units';
|
|
9
|
-
import { FormLabel, FormNumberInput1, FormSelect } from
|
|
9
|
+
import { FormLabel, FormNumberInput1, FormSelect } from "../../components/style/export";
|
|
10
10
|
import { Map } from 'immutable';
|
|
11
|
-
import { toFixedFloat } from
|
|
12
|
-
import PropertyStyle from
|
|
11
|
+
import { toFixedFloat } from "../../utils/math";
|
|
12
|
+
import PropertyStyle from "./shared-property-style";
|
|
13
13
|
var internalTableStyle = {
|
|
14
14
|
borderCollapse: 'collapse'
|
|
15
15
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { FormLabel, FormNumberInput } from
|
|
4
|
-
import PropertyStyle from
|
|
3
|
+
import { FormLabel, FormNumberInput } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyNumber(_ref) {
|
|
6
6
|
var value = _ref.value,
|
|
7
7
|
onUpdate = _ref.onUpdate,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { FormLabel } from
|
|
4
|
-
import PropertyStyle from
|
|
3
|
+
import { FormLabel } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyReadOnly(_ref) {
|
|
6
6
|
var value = _ref.value,
|
|
7
7
|
onUpdate = _ref.onUpdate,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { FormLabel, FormTextInput } from
|
|
4
|
-
import PropertyStyle from
|
|
3
|
+
import { FormLabel, FormTextInput } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
var tableStyle = {
|
|
6
6
|
width: '100%',
|
|
7
7
|
borderSpacing: '2px 0',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { FormLabel, Button } from
|
|
4
|
-
import PropertyStyle from
|
|
3
|
+
import { FormLabel, Button } from "../../components/style/export";
|
|
4
|
+
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyToggle(_ref) {
|
|
6
6
|
var value = _ref.value,
|
|
7
7
|
onUpdate = _ref.onUpdate,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Three from 'three';
|
|
2
|
-
import { OBJTYPE_MESH } from
|
|
2
|
+
import { OBJTYPE_MESH } from "../../constants";
|
|
3
3
|
export function controlGeom() {
|
|
4
4
|
var vertices = new Float32Array([0, 0.02, 0.55, -0.08, 0, 0.5, -0.05, 0, 0.5, -0.05, 0, -0.5, -0.08, 0, -0.5, 0, 0.02, -0.55, 0.08, 0, -0.5, 0.05, 0, -0.5, 0.05, 0, 0.5, 0.08, 0, 0.5, 0, 0.02, 0.55, -0.08, 0.04, 0.5, -0.05, 0.04, 0.5, -0.05, 0.04, -0.5, -0.08, 0.04, -0.5, 0, 0.02, -0.55, 0.08, 0.04, -0.5, 0.05, 0.04, -0.5, 0.05, 0.04, 0.5, 0.08, 0.04, 0.5, 0, 0.02, 0.55]);
|
|
5
5
|
var indices = new Uint16Array([0, 1, 9, 4, 5, 6, 2, 3, 8, 3, 7, 8, 10, 11, 19, 14, 15, 16, 12, 13, 18, 13, 17, 18, 10, 1, 11, 10, 9, 19, 1, 2, 11, 2, 12, 11, 8, 9, 18, 9, 18, 19, 12, 2, 3, 12, 3, 13, 17, 7, 8, 17, 8, 18, 5, 4, 14, 15, 6, 16]);
|
|
@@ -14,12 +14,12 @@ import convert from 'convert-units';
|
|
|
14
14
|
import { fromJS, Map } from 'immutable';
|
|
15
15
|
import React, { useState } from 'react';
|
|
16
16
|
import * as Three from 'three';
|
|
17
|
-
import * as SceneCreator from
|
|
18
|
-
import { ARROW_COLOR, BASE_CABINET_LAYOUTPOS, OBJTYPE_GROUP, OBJTYPE_MESH, SHADE_DARK_PURPLE_COLOR, SHAPE_SVG_DEPTH, SHAPE_SVG_PADDING, SHAPE_SVG_WIDTH, STATUS_WARNING_COLOR, STATUS_WARNING_LIGHT_COLOR, TALL_CABINET_LAYOUTPOS, UNIT_CENTIMETER, UNIT_INCH, WALL_CABINET_LAYOUTPOS } from
|
|
19
|
-
import { Item } from
|
|
20
|
-
import * as GeomUtils from
|
|
21
|
-
import { loadGLTF } from
|
|
22
|
-
import { animateDoor, translateDrawer } from
|
|
17
|
+
import * as SceneCreator from "../../components/viewer3d/scene-creator";
|
|
18
|
+
import { ARROW_COLOR, BASE_CABINET_LAYOUTPOS, OBJTYPE_GROUP, OBJTYPE_MESH, SHADE_DARK_PURPLE_COLOR, SHAPE_SVG_DEPTH, SHAPE_SVG_PADDING, SHAPE_SVG_WIDTH, STATUS_WARNING_COLOR, STATUS_WARNING_LIGHT_COLOR, TALL_CABINET_LAYOUTPOS, UNIT_CENTIMETER, UNIT_INCH, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
19
|
+
import { Item } from "../../models";
|
|
20
|
+
import * as GeomUtils from "./geom-utils";
|
|
21
|
+
import { loadGLTF } from "./load-obj";
|
|
22
|
+
import { animateDoor, translateDrawer } from "../../utils/helper";
|
|
23
23
|
|
|
24
24
|
// env Map ///////////////
|
|
25
25
|
var paramsCounter = {
|
|
@@ -3,7 +3,7 @@ import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader.js';
|
|
|
3
3
|
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
|
|
4
4
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
5
5
|
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
|
6
|
-
import { OBJTYPE_MESH } from
|
|
6
|
+
import { OBJTYPE_MESH } from "../../constants";
|
|
7
7
|
export function loadObjWithMaterial(mtlFile, objFile, imgPath) {
|
|
8
8
|
var manager = new LoadingManager();
|
|
9
9
|
var mtlLoader = new MTLLoader(manager);
|
package/es/class/area.js
CHANGED
|
@@ -8,8 +8,8 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
8
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
9
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
10
10
|
import { fromJS } from 'immutable';
|
|
11
|
-
import { Layer, Vertex
|
|
12
|
-
import { IDBroker, NameGenerator } from
|
|
11
|
+
import { Group, Layer, Vertex } from "./export";
|
|
12
|
+
import { IDBroker, NameGenerator } from "../utils/export";
|
|
13
13
|
var Area = /*#__PURE__*/function () {
|
|
14
14
|
function Area() {
|
|
15
15
|
_classCallCheck(this, Area);
|
package/es/class/export.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import Project from
|
|
2
|
-
import Group from
|
|
3
|
-
import Layer from
|
|
4
|
-
import Line from
|
|
5
|
-
import Hole from
|
|
6
|
-
import Vertex from
|
|
7
|
-
import Area from
|
|
8
|
-
import Item from
|
|
9
|
-
import FuseUtils from
|
|
10
|
-
import { HorizontalGuide, VerticalGuide } from
|
|
1
|
+
import Project from "./project";
|
|
2
|
+
import Group from "./group";
|
|
3
|
+
import Layer from "./layer";
|
|
4
|
+
import Line from "./line";
|
|
5
|
+
import Hole from "./hole";
|
|
6
|
+
import Vertex from "./vertex";
|
|
7
|
+
import Area from "./area";
|
|
8
|
+
import Item from "./item";
|
|
9
|
+
import FuseUtils from "./FuseUtils";
|
|
10
|
+
import { HorizontalGuide, VerticalGuide } from "./guide";
|
|
11
11
|
export { Project, Group, FuseUtils, Layer, Line, Hole, Vertex, Area, Item, HorizontalGuide, VerticalGuide };
|
|
12
12
|
export default {
|
|
13
13
|
Project: Project,
|
package/es/class/group.js
CHANGED
|
@@ -10,10 +10,10 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
10
10
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { Group as GroupModel } from
|
|
16
|
-
import {
|
|
13
|
+
import { Area, Hole, Item, Layer, Line, Project, Vertex } from "./export";
|
|
14
|
+
import { List, Map } from 'immutable';
|
|
15
|
+
import { Group as GroupModel } from "../models";
|
|
16
|
+
import { GeometryUtils, IDBroker } from "../utils/export";
|
|
17
17
|
var Group = /*#__PURE__*/function () {
|
|
18
18
|
function Group() {
|
|
19
19
|
_classCallCheck(this, Group);
|
package/es/class/guide.js
CHANGED
|
@@ -4,7 +4,7 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
4
4
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { IDBroker } from
|
|
7
|
+
import { IDBroker } from "../utils/export";
|
|
8
8
|
var HorizontalGuide = /*#__PURE__*/function () {
|
|
9
9
|
function HorizontalGuide() {
|
|
10
10
|
_classCallCheck(this, HorizontalGuide);
|
package/es/class/hole.js
CHANGED
|
@@ -4,12 +4,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
4
4
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { GeometryUtils } from '../utils/export';
|
|
7
|
+
import { fromJS, List, Map } from 'immutable';
|
|
8
|
+
import { Group, Layer } from "./export";
|
|
9
|
+
import { GeometryUtils, IDBroker } from "../utils/export";
|
|
10
|
+
import { addLineSegmentSnap, nearestSnap } from "../utils/snap";
|
|
11
|
+
import { MODE_DRAGGING_HOLE, MODE_DRAGGING_HOLE_3D, MODE_DRAWING_HOLE, MODE_DRAWING_HOLE_3D, MODE_IDLE, MODE_IDLE_3D } from "../constants";
|
|
13
12
|
var Hole = /*#__PURE__*/function () {
|
|
14
13
|
function Hole() {
|
|
15
14
|
_classCallCheck(this, Hole);
|
package/es/class/item.js
CHANGED
|
@@ -14,15 +14,13 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
16
|
import convert from 'convert-units';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { hasMoldingLayout } from '../utils/molding';
|
|
25
|
-
import { getInstallationSuffix } from '../components/viewer2d/utils';
|
|
17
|
+
import { Group, Hole, Layer } from "./export";
|
|
18
|
+
import { GeometryUtils, IDBroker, MoldingUtils, NameGenerator } from "../utils/export";
|
|
19
|
+
import { fromJS, Map } from 'immutable';
|
|
20
|
+
import { INSTALLATION_SUFFIX_TYPE, MODE_DRAGGING_ITEM, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM, MODE_ROTATING_ITEM_3D, MOLDING_LOCATIONS } from "../constants";
|
|
21
|
+
import { debugUtil } from "../utils/helper";
|
|
22
|
+
import { hasMoldingLayout } from "../utils/molding";
|
|
23
|
+
import { getInstallationSuffix } from "../components/viewer2d/utils";
|
|
26
24
|
var allItemRect;
|
|
27
25
|
var allItemSnap;
|
|
28
26
|
var allLines;
|
|
@@ -726,7 +724,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
726
724
|
value: function beginDraggingItem(state, layerID, itemID, x, y) {
|
|
727
725
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
728
726
|
time1 = debugUtil();
|
|
729
|
-
if (
|
|
727
|
+
if (!item) return;
|
|
730
728
|
state = state.merge({
|
|
731
729
|
mode: MODE_DRAGGING_ITEM,
|
|
732
730
|
draggingSupport: Map({
|
|
@@ -747,7 +745,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
747
745
|
value: function beginDraggingItem3D(state, layerID, itemID, x, y) {
|
|
748
746
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
749
747
|
state = state.setIn(['scene', 'isEndDragging'], false);
|
|
750
|
-
if (
|
|
748
|
+
if (!item) return {
|
|
751
749
|
updatedState: state
|
|
752
750
|
};
|
|
753
751
|
state = state.merge({
|
|
@@ -780,7 +778,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
780
778
|
var diffX = startPointX - x;
|
|
781
779
|
var diffY = startPointY - y;
|
|
782
780
|
var item = scene.getIn(['layers', layerID, 'items', itemID]);
|
|
783
|
-
if (
|
|
781
|
+
if (!item) return {
|
|
784
782
|
updatedState: state
|
|
785
783
|
};
|
|
786
784
|
var tX = originalX - diffX;
|
package/es/class/layer.js
CHANGED
|
@@ -5,10 +5,10 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { List } from 'immutable';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Layer as LayerModel } from
|
|
11
|
-
import { isEmpty } from
|
|
8
|
+
import { Area, Hole, Item, Line, Project, Vertex } from "./export";
|
|
9
|
+
import { GeometryUtils, GraphInnerCycles, IDBroker } from "../utils/export";
|
|
10
|
+
import { Layer as LayerModel } from "../models";
|
|
11
|
+
import { isEmpty } from "../utils/helper";
|
|
12
12
|
var sameSet = function sameSet(set1, set2) {
|
|
13
13
|
return set1.size === set2.size && set1.isSuperset(set2) && set1.isSubset(set2);
|
|
14
14
|
};
|
package/es/class/line.js
CHANGED
|
@@ -11,11 +11,11 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
13
|
import { fromJS, List, Map } from 'immutable';
|
|
14
|
-
import { Group, Hole, Layer, Vertex } from
|
|
15
|
-
import { GeometryUtils, history, IDBroker, NameGenerator, SnapSceneUtils, SnapUtils } from
|
|
14
|
+
import { Group, Hole, Layer, Vertex } from "./export";
|
|
15
|
+
import { GeometryUtils, history, IDBroker, NameGenerator, SnapSceneUtils, SnapUtils } from "../utils/export";
|
|
16
16
|
import * as Three from 'three';
|
|
17
|
-
import { END_DRAGGING_LINE, END_DRAGGING_VERTEX, END_DRAWING_LINE, EPSILON, MIN_ANGLE_DISALLOW_DRAW_WALL, MODE_DRAGGING_LINE, MODE_DRAWING_LINE, MODE_IDLE, MODE_WAITING_DRAWING_LINE, UNIT_ANGLE } from
|
|
18
|
-
import { isEmpty } from
|
|
17
|
+
import { END_DRAGGING_LINE, END_DRAGGING_VERTEX, END_DRAWING_LINE, EPSILON, MIN_ANGLE_DISALLOW_DRAW_WALL, MODE_DRAGGING_LINE, MODE_DRAWING_LINE, MODE_IDLE, MODE_WAITING_DRAWING_LINE, UNIT_ANGLE } from "../constants";
|
|
18
|
+
import { isEmpty } from "../utils/helper";
|
|
19
19
|
var timeGlobal = 0;
|
|
20
20
|
var TimeRecorder = /*#__PURE__*/function () {
|
|
21
21
|
function TimeRecorder(name) {
|