kitchen-simulator 5.0.0-new-api → 5.0.0-new-api.2
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/LiteKitchenConfigurator.js +1 -1
- package/es/assets/Window.hdr +2100 -0
- package/es/assets/img/default/maple.jpg +0 -0
- package/es/assets/img/default/steel.jpg +0 -0
- package/es/catalog/catalog.js +0 -2
- package/es/catalog/utils/exporter.js +2 -0
- package/es/class/area.js +0 -1
- package/es/class/export.js +1 -3
- package/es/components/content.js +1 -3
- package/es/components/style/export.js +2 -28
- package/es/components/viewer2d/line.js +2 -2
- package/es/components/viewer2d/viewer2d.js +0 -1
- package/es/components/viewer3d/front3D.js +1 -2
- package/es/components/viewer3d/pointer-lock-navigation.js +0 -90
- package/es/components/viewer3d/scene-creator.js +7 -5
- package/es/components/viewer3d/three-memory-cleaner.js +0 -14
- package/es/components/viewer3d/viewer3d.js +1 -1
- package/es/constants.js +3 -3
- package/es/devLiteRenderer.js +119 -61
- package/es/events/external/handleExternalEvent.js +140 -0
- package/es/{utils/isolate-event-handler.js → events/external/handleExternalEvent.util.js} +17 -563
- package/es/events/external/handlers.addItem.js +47 -0
- package/es/events/external/handlers.changeDoorStyle.js +131 -0
- package/es/events/external/handlers.elementOps.js +8 -0
- package/es/events/external/handlers.finishing.js +26 -0
- package/es/events/external/handlers.hole.js +4 -0
- package/es/events/external/handlers.loadProject.js +117 -0
- package/es/events/external/handlers.molding.js +24 -0
- package/es/events/external/handlers.projectLifecycle.js +11 -0
- package/es/events/external/handlers.projectSettings.js +32 -0
- package/es/events/external/handlers.replaceCabinet.js +41 -0
- package/es/events/external/handlers.roomShape.js +8 -0
- package/es/events/external/handlers.syncScene.js +21 -0
- package/es/events/external/handlers.updateSelectedElements.js +11 -0
- package/es/events/external/handlers.viewMode.js +11 -0
- package/es/events/external/handlers.viewerNavigation.js +108 -0
- package/es/events/external/handlers.wall.js +7 -0
- package/es/mappings/external-events/mappers/ccdfMapper.js +2 -2
- package/es/mappings/external-events/mappers/changeDoorStyleMapper.js +1 -29
- package/es/plugins/keyboard.js +1 -1
- package/es/reducers/export.js +2 -4
- package/es/reducers/items-reducer.js +1 -1
- package/es/reducers/project-reducer.js +1 -1
- package/es/reducers/reducer.js +2 -3
- package/es/shared/objects/immutable.js +3 -0
- package/es/utils/geometry.js +276 -74
- package/es/utils/history.js +2 -2
- package/es/utils/molding.js +6 -20
- package/lib/LiteKitchenConfigurator.js +2 -2
- package/lib/assets/Window.hdr +2100 -0
- package/lib/assets/img/default/maple.jpg +0 -0
- package/lib/assets/img/default/steel.jpg +0 -0
- package/lib/catalog/catalog.js +0 -2
- package/lib/catalog/utils/exporter.js +2 -0
- package/lib/class/area.js +0 -1
- package/lib/class/export.js +0 -8
- package/lib/components/content.js +1 -3
- package/lib/components/style/export.js +1 -105
- package/lib/components/viewer2d/line.js +1 -1
- package/lib/components/viewer2d/viewer2d.js +0 -1
- package/lib/components/viewer3d/front3D.js +1 -2
- package/lib/components/viewer3d/pointer-lock-navigation.js +0 -90
- package/lib/components/viewer3d/scene-creator.js +7 -5
- package/lib/components/viewer3d/three-memory-cleaner.js +0 -14
- package/lib/constants.js +8 -8
- package/lib/devLiteRenderer.js +118 -60
- package/lib/events/external/handleExternalEvent.js +147 -0
- package/lib/{utils/isolate-event-handler.js → events/external/handleExternalEvent.util.js} +14 -557
- package/lib/events/external/handlers.addItem.js +54 -0
- package/lib/events/external/handlers.changeDoorStyle.js +138 -0
- package/lib/events/external/handlers.elementOps.js +15 -0
- package/lib/events/external/handlers.finishing.js +32 -0
- package/lib/events/external/handlers.hole.js +10 -0
- package/lib/events/external/handlers.loadProject.js +124 -0
- package/lib/events/external/handlers.molding.js +31 -0
- package/lib/events/external/handlers.projectLifecycle.js +19 -0
- package/lib/events/external/handlers.projectSettings.js +38 -0
- package/lib/events/external/handlers.replaceCabinet.js +48 -0
- package/lib/events/external/handlers.roomShape.js +14 -0
- package/lib/events/external/handlers.syncScene.js +27 -0
- package/lib/events/external/handlers.updateSelectedElements.js +17 -0
- package/lib/events/external/handlers.viewMode.js +19 -0
- package/lib/events/external/handlers.viewerNavigation.js +117 -0
- package/lib/events/external/handlers.wall.js +13 -0
- package/lib/mappings/external-events/mappers/ccdfMapper.js +2 -2
- package/lib/mappings/external-events/mappers/changeDoorStyleMapper.js +1 -29
- package/lib/reducers/export.js +1 -9
- package/lib/reducers/reducer.js +0 -1
- package/lib/shared/objects/immutable.js +9 -0
- package/lib/utils/geometry.js +276 -74
- package/lib/utils/history.js +1 -1
- package/lib/utils/molding.js +6 -20
- package/package.json +1 -1
- package/es/assets/gltf/door_closet.bin +0 -0
- package/es/assets/gltf/door_closet.fbx +0 -0
- package/es/assets/gltf/door_exterior.bin +0 -0
- package/es/assets/gltf/door_exterior.fbx +0 -0
- package/es/assets/gltf/door_interior.bin +0 -0
- package/es/assets/gltf/door_interior.fbx +0 -0
- package/es/assets/gltf/door_sliding.bin +0 -0
- package/es/assets/gltf/door_sliding.fbx +0 -0
- package/es/assets/img/png/helper/video_preview_3d.png +0 -0
- package/es/assets/img/png/helper/video_preview_start.png +0 -0
- package/es/assets/img/svg/color/Brown.svg +0 -9
- package/es/assets/img/svg/color/Dark.svg +0 -9
- package/es/assets/img/svg/color/Light.svg +0 -9
- package/es/assets/img/svg/color/Medium.svg +0 -9
- package/es/assets/img/svg/color/Unfinished.svg +0 -9
- package/es/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
- package/es/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/es/catalog/properties/export.js +0 -21
- package/es/catalog/properties/property-checkbox.js +0 -68
- package/es/catalog/properties/property-color.js +0 -39
- package/es/catalog/properties/property-enum.js +0 -50
- package/es/catalog/properties/property-hidden.js +0 -19
- package/es/catalog/properties/property-lenght-measure.js +0 -100
- package/es/catalog/properties/property-length-measure.js +0 -84
- package/es/catalog/properties/property-length-measure_hole.js +0 -100
- package/es/catalog/properties/property-number.js +0 -48
- package/es/catalog/properties/property-read-only.js +0 -26
- package/es/catalog/properties/property-string.js +0 -48
- package/es/catalog/properties/property-toggle.js +0 -39
- package/es/catalog/properties/shared-property-style.js +0 -14
- package/es/catalog/utils/FuseUtils.js +0 -79
- package/es/class/FuseUtils.js +0 -79
- package/es/components/style/button.js +0 -106
- package/es/components/style/cancel-button.js +0 -21
- package/es/components/style/content-container.js +0 -30
- package/es/components/style/content-title.js +0 -25
- package/es/components/style/delete-button.js +0 -24
- package/es/components/style/form-block.js +0 -20
- package/es/components/style/form-color-input.js +0 -26
- package/es/components/style/form-label.js +0 -22
- package/es/components/style/form-number-input_2.js +0 -200
- package/es/components/style/form-select.js +0 -19
- package/es/components/style/form-slider.js +0 -60
- package/es/components/style/form-text-input.js +0 -69
- package/es/reducers/user-reducer.js +0 -41
- package/es/styles/export.js +0 -5
- package/es/styles/tabs.css +0 -40
- package/lib/assets/gltf/door_closet.bin +0 -0
- package/lib/assets/gltf/door_closet.fbx +0 -0
- package/lib/assets/gltf/door_exterior.bin +0 -0
- package/lib/assets/gltf/door_exterior.fbx +0 -0
- package/lib/assets/gltf/door_interior.bin +0 -0
- package/lib/assets/gltf/door_interior.fbx +0 -0
- package/lib/assets/gltf/door_sliding.bin +0 -0
- package/lib/assets/gltf/door_sliding.fbx +0 -0
- package/lib/assets/img/png/helper/video_preview_3d.png +0 -0
- package/lib/assets/img/png/helper/video_preview_start.png +0 -0
- package/lib/assets/img/svg/color/Brown.svg +0 -9
- package/lib/assets/img/svg/color/Dark.svg +0 -9
- package/lib/assets/img/svg/color/Light.svg +0 -9
- package/lib/assets/img/svg/color/Medium.svg +0 -9
- package/lib/assets/img/svg/color/Unfinished.svg +0 -9
- package/lib/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
- package/lib/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/lib/catalog/properties/export.js +0 -81
- package/lib/catalog/properties/property-checkbox.js +0 -76
- package/lib/catalog/properties/property-color.js +0 -47
- package/lib/catalog/properties/property-enum.js +0 -58
- package/lib/catalog/properties/property-hidden.js +0 -27
- package/lib/catalog/properties/property-lenght-measure.js +0 -108
- package/lib/catalog/properties/property-length-measure.js +0 -92
- package/lib/catalog/properties/property-length-measure_hole.js +0 -108
- package/lib/catalog/properties/property-number.js +0 -56
- package/lib/catalog/properties/property-read-only.js +0 -34
- package/lib/catalog/properties/property-string.js +0 -56
- package/lib/catalog/properties/property-toggle.js +0 -47
- package/lib/catalog/properties/shared-property-style.js +0 -21
- package/lib/catalog/utils/FuseUtils.js +0 -87
- package/lib/class/FuseUtils.js +0 -87
- package/lib/components/style/button.js +0 -115
- package/lib/components/style/cancel-button.js +0 -29
- package/lib/components/style/content-container.js +0 -38
- package/lib/components/style/content-title.js +0 -35
- package/lib/components/style/delete-button.js +0 -34
- package/lib/components/style/form-block.js +0 -28
- package/lib/components/style/form-color-input.js +0 -34
- package/lib/components/style/form-label.js +0 -30
- package/lib/components/style/form-number-input_2.js +0 -209
- package/lib/components/style/form-select.js +0 -29
- package/lib/components/style/form-slider.js +0 -68
- package/lib/components/style/form-text-input.js +0 -78
- package/lib/reducers/user-reducer.js +0 -48
- package/lib/styles/export.js +0 -13
- package/lib/styles/tabs.css +0 -40
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
import { DEFAULT_INTERIOR_URL } from "../../../constants";
|
|
5
5
|
import { isEmpty } from "../../../utils/helper";
|
|
6
6
|
export function mapChangeDoorStyleEvent(evt, state) {
|
|
7
|
-
var _evt$payload, _layer$toJS
|
|
7
|
+
var _evt$payload, _layer$toJS;
|
|
8
8
|
if (isEmpty(evt)) return null;
|
|
9
9
|
var targetDoorStyle = evt === null || evt === void 0 || (_evt$payload = evt.payload) === null || _evt$payload === void 0 ? void 0 : _evt$payload.doorStyle;
|
|
10
10
|
if (isEmpty(targetDoorStyle)) return evt;
|
|
@@ -33,33 +33,5 @@ export function mapChangeDoorStyleEvent(evt, state) {
|
|
|
33
33
|
evt.payload.doorStyle = _objectSpread(_objectSpread({}, targetDoorStyle), {}, {
|
|
34
34
|
doorStyles: doorStyles
|
|
35
35
|
});
|
|
36
|
-
// make itemCDS using assets3d
|
|
37
|
-
var itemCDS = [];
|
|
38
|
-
var itemCDSData = {};
|
|
39
|
-
var cabitnetDoorStyleId;
|
|
40
|
-
targetDoorStyle === null || targetDoorStyle === void 0 || (_targetDoorStyle$ccdf = targetDoorStyle.ccdf_list) === null || _targetDoorStyle$ccdf === void 0 || _targetDoorStyle$ccdf.forEach(function (asItem) {
|
|
41
|
-
if (!isEmpty(asItem === null || asItem === void 0 ? void 0 : asItem.id)) {
|
|
42
|
-
cabitnetDoorStyleId = asItem.id;
|
|
43
|
-
}
|
|
44
|
-
asItem === null || asItem === void 0 || asItem.assets3d.forEach(function (as) {
|
|
45
|
-
if (!isEmpty(as === null || as === void 0 ? void 0 : as.placeholder_name) && !isEmpty(as === null || as === void 0 ? void 0 : as.gltf)) {
|
|
46
|
-
var updatedName = 'base_' + (as === null || as === void 0 ? void 0 : as.placeholder_name) + '_gltf';
|
|
47
|
-
itemCDSData[updatedName] = as === null || as === void 0 ? void 0 : as.gltf;
|
|
48
|
-
}
|
|
49
|
-
itemCDSData['is_euro_cds'] = !isEmpty(as === null || as === void 0 ? void 0 : as.is_euro_cds) ? as.is_euro_cds : 0;
|
|
50
|
-
itemCDSData['euro_shape_svg'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_shape_svg) ? as.is_euro_cds : null;
|
|
51
|
-
itemCDSData['euro_width'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_width) ? as.is_euro_cds : null;
|
|
52
|
-
itemCDSData['euro_height'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_height) ? as.is_euro_cds : null;
|
|
53
|
-
itemCDSData['euro_length'] = !isEmpty(as === null || as === void 0 ? void 0 : as.euro_length) ? as.is_euro_cds : null;
|
|
54
|
-
});
|
|
55
|
-
var data = [];
|
|
56
|
-
data.push(itemCDSData);
|
|
57
|
-
itemCDS.push({
|
|
58
|
-
itemID: asItem.cabinet_id,
|
|
59
|
-
data: data,
|
|
60
|
-
cabinet_door_style_id: cabitnetDoorStyleId
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
evt.payload.itemCDS = itemCDS;
|
|
64
36
|
return evt;
|
|
65
37
|
}
|
package/es/plugins/keyboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MODE_IDLE,
|
|
1
|
+
import { MODE_IDLE, MODE_3D_VIEW, MODE_SNAPPING, KEYBOARD_BUTTON_CODE, MODE_IDLE_3D, MODE_DRAWING_ITEM_3D, MODE_DRAWING_ITEM } from "../constants";
|
|
2
2
|
import { rollback, undo, redo, recreate, uncreate, remove, toggleSnap, copyProperties, pasteProperties, shift2doff, shift2don } from "../actions/project-actions";
|
|
3
3
|
export default function keyboard() {
|
|
4
4
|
return function (store, stateExtractor) {
|
package/es/reducers/export.js
CHANGED
|
@@ -8,8 +8,7 @@ import KitchenConfiguratorSceneReducer from "./scene-reducer";
|
|
|
8
8
|
import KitchenConfiguratorVerticesReducer from "./vertices-reducer";
|
|
9
9
|
import KitchenConfiguratorViewer2dReducer from "./viewer2d-reducer";
|
|
10
10
|
import KitchenConfiguratorViewer3dReducer from "./viewer3d-reducer";
|
|
11
|
-
|
|
12
|
-
export { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer, KitchenConfiguratorUserReducer };
|
|
11
|
+
export { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer };
|
|
13
12
|
export default {
|
|
14
13
|
KitchenConfiguratorAreasReducer: KitchenConfiguratorAreasReducer,
|
|
15
14
|
KitchenConfiguratorHolesReducer: KitchenConfiguratorHolesReducer,
|
|
@@ -20,6 +19,5 @@ export default {
|
|
|
20
19
|
KitchenConfiguratorSceneReducer: KitchenConfiguratorSceneReducer,
|
|
21
20
|
KitchenConfiguratorVerticesReducer: KitchenConfiguratorVerticesReducer,
|
|
22
21
|
KitchenConfiguratorViewer2dReducer: KitchenConfiguratorViewer2dReducer,
|
|
23
|
-
KitchenConfiguratorViewer3dReducer: KitchenConfiguratorViewer3dReducer
|
|
24
|
-
KitchenConfiguratorUserReducer: KitchenConfiguratorUserReducer
|
|
22
|
+
KitchenConfiguratorViewer3dReducer: KitchenConfiguratorViewer3dReducer
|
|
25
23
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Item, Area } from "../class/export";
|
|
2
2
|
import { history } from "../utils/export";
|
|
3
|
-
import { TOGGLE_LOADING_CABINET, SELECT_TOOL_DRAWING_ITEM, UPDATE_DRAWING_ITEM, END_DRAWING_ITEM, BEGIN_DRAGGING_ITEM, BEGIN_DRAGGING_ITEM_3D, UPDATE_DRAGGING_ITEM, UPDATE_DRAGGING_ITEM_CHANGED, UPDATE_DRAGGING_ITEM_3DX, UPDATE_DRAGGING_ITEM_3DY, END_DRAGGING_ITEM, END_DRAGGING_ITEM_3D, BEGIN_ROTATING_ITEM, BEGIN_ROTATING_ITEM_3D,
|
|
3
|
+
import { TOGGLE_LOADING_CABINET, SELECT_TOOL_DRAWING_ITEM, UPDATE_DRAWING_ITEM, END_DRAWING_ITEM, BEGIN_DRAGGING_ITEM, BEGIN_DRAGGING_ITEM_3D, UPDATE_DRAGGING_ITEM, UPDATE_DRAGGING_ITEM_CHANGED, UPDATE_DRAGGING_ITEM_3DX, UPDATE_DRAGGING_ITEM_3DY, END_DRAGGING_ITEM, END_DRAGGING_ITEM_3D, BEGIN_ROTATING_ITEM, BEGIN_ROTATING_ITEM_3D, UPDATE_ROTATING_ITEM, UPDATE_ROTATING_ITEM_CHANGED, END_ROTATING_ITEM, END_ROTATING_ITEM_3D, REPLACE_SUBMODULE, SELECT_ITEM, ANIMATE_OBJECT, REMOVE_REPLACE_SUBMODULE, ITEM_MOVE_UP, SELECT_TOOL_DRAWING_ITEM_3D, SET_DOOR_STYLE, SET_HANDLE_MATERIAL, SET_INITIAL_DOOR_STYLE, UPDATE_ITEM_POSITION, SET_DOOR_HANDLE, SET_WALL_COLOR, END_CREATING_CABINET, UPDATE_POPUP_OPEN, SET_MODELLING, SET_COUNTER_TOP, SET_BACKSPLASH, SET_BACKSPLASH_VISIBLE, SET_APPLIANCE_MATERIAL, DUPLICATE_SELECTED, EDIT_WIDTH, END_LOADING, SET_MOLDING, UPDATE_MOLDING, STORE_DIST_ARRAY, VALIDATE_ITEM_POSTIONS, REPLACE_ITEM
|
|
4
4
|
// SET_MOVE_STATUS,
|
|
5
5
|
// SET_ROTATE_STATUS
|
|
6
6
|
} from "../constants";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { history } from "../utils/export";
|
|
2
|
-
import { LOAD_PROJECT, NEW_PROJECT, OPEN_CATALOG, SELECT_TOOL_EDIT, MODE_IDLE, UNSELECT_ALL, SELECT_ALL, SET_PROPERTIES, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_HOLES_ATTRIBUTES, REMOVE,
|
|
2
|
+
import { LOAD_PROJECT, NEW_PROJECT, OPEN_CATALOG, SELECT_TOOL_EDIT, MODE_IDLE, UNSELECT_ALL, SELECT_ALL, SET_PROPERTIES, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_HOLES_ATTRIBUTES, REMOVE, UNDO, REDO, RECREATE, UNCREATE, PROJECT_RE_NAME, ROLLBACK, SET_PROJECT_PROPERTIES, SET_PROJECT_ID, OPEN_PROJECT_CONFIGURATOR, INIT_CATALOG, UPDATE_MOUSE_COORDS, UPDATE_ZOOM_SCALE, TOGGLE_SNAP, CHANGE_CATALOG_PAGE, GO_BACK_TO_CATALOG_PAGE, THROW_ERROR, THROW_WARNING, COPY_PROPERTIES, PASTE_PROPERTIES, PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY, ALTERATE_STATE, SET_MODE, ADD_HORIZONTAL_GUIDE, ADD_VERTICAL_GUIDE, ADD_CIRCULAR_GUIDE, REMOVE_HORIZONTAL_GUIDE, REMOVE_VERTICAL_GUIDE, REMOVE_CIRCULAR_GUIDE, REMOVE_DRAWING_SUPPORT, SET_STATE_PROPERTIES, SHIFT2DON, SHIFT2DOFF, MODE_DRAWING_LINE, SET_IS_HELP, SET_IS_CABINET_DRAWING, ADD_ELEMENT_TO_CATALOG, CREATE_ROOM_WITH_SHAPE } from "../constants";
|
|
3
3
|
import { Project } from "../class/export";
|
|
4
4
|
export default function (state, action) {
|
|
5
5
|
switch (action.type) {
|
package/es/reducers/reducer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PROJECT_ACTIONS, VIEWER2D_ACTIONS, VIEWER3D_ACTIONS, GROUP_ACTIONS, ITEMS_ACTIONS, HOLE_ACTIONS, LINE_ACTIONS, AREA_ACTIONS, SCENE_ACTIONS, VERTEX_ACTIONS
|
|
2
|
-
import { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer
|
|
1
|
+
import { PROJECT_ACTIONS, VIEWER2D_ACTIONS, VIEWER3D_ACTIONS, GROUP_ACTIONS, ITEMS_ACTIONS, HOLE_ACTIONS, LINE_ACTIONS, AREA_ACTIONS, SCENE_ACTIONS, VERTEX_ACTIONS } from "../constants";
|
|
2
|
+
import { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer } from "./export";
|
|
3
3
|
import { State } from "../models";
|
|
4
4
|
export var initialState = new State();
|
|
5
5
|
export default function appReducer(state, action) {
|
|
@@ -14,6 +14,5 @@ export default function appReducer(state, action) {
|
|
|
14
14
|
if (GROUP_ACTIONS[action.type]) return KitchenConfiguratorGroupsReducer.apply(void 0, arguments);
|
|
15
15
|
if (SCENE_ACTIONS[action.type]) return KitchenConfiguratorSceneReducer.apply(void 0, arguments);
|
|
16
16
|
if (VERTEX_ACTIONS[action.type]) return KitchenConfiguratorVerticesReducer.apply(void 0, arguments);
|
|
17
|
-
if (USER_ACTIONS[action.type]) return KitchenConfiguratorUserReducer.apply(void 0, arguments);
|
|
18
17
|
return state || initialState;
|
|
19
18
|
}
|
package/es/utils/geometry.js
CHANGED
|
@@ -2132,8 +2132,6 @@ export function relationshipOfTwoOverlappedLines2(srcLine, destLine) {
|
|
|
2132
2132
|
};
|
|
2133
2133
|
var line0 = [p1, p2].sort(comparator);
|
|
2134
2134
|
var line1 = [p3, p4].sort(comparator);
|
|
2135
|
-
var isReversedSrcLineDirection = false;
|
|
2136
|
-
if (line0[0].x === srcLine.x2 && line0[0].y === srcLine.y2) isReversedSrcLineDirection = true;
|
|
2137
2135
|
var _sort3 = [line0, line1].sort(function (lineA, lineB) {
|
|
2138
2136
|
return comparator(lineA[0], lineB[0]);
|
|
2139
2137
|
}),
|
|
@@ -2141,101 +2139,305 @@ export function relationshipOfTwoOverlappedLines2(srcLine, destLine) {
|
|
|
2141
2139
|
lineSX = _sort4[0],
|
|
2142
2140
|
lineDX = _sort4[1];
|
|
2143
2141
|
var isReversedSrcLineIdx = false;
|
|
2144
|
-
if (lineSX[0].x === line0[0].x && lineSX[0].y === line0[0].y) isReversedSrcLineIdx = false;
|
|
2145
|
-
|
|
2142
|
+
if (lineSX[0].x === line0[0].x && lineSX[0].y === line0[0].y) isReversedSrcLineIdx = false; // SX=srcLine, DX=destLine
|
|
2143
|
+
else if (lineSX[0].x === line1[0].x && lineSX[0].y === line1[0].y) isReversedSrcLineIdx = true; // DX=srcLine, SX=destLine
|
|
2144
|
+
|
|
2145
|
+
var compare0 = comparator(lineSX[0], lineDX[0]); // always <= 0
|
|
2146
2146
|
var compare1 = comparator(lineSX[1], lineDX[0]);
|
|
2147
2147
|
var compare2 = comparator(lineSX[1], lineDX[1]);
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
//
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2148
|
+
var sp = null,
|
|
2149
|
+
ep = null;
|
|
2150
|
+
if (MathUtils.fAbs(compare1) < EPSILON) {
|
|
2151
|
+
// SX
|
|
2152
|
+
// |----------|
|
|
2153
|
+
// DX
|
|
2154
|
+
// |------------|
|
|
2155
|
+
// link : lineSX[0] - lineDX[1]
|
|
2156
|
+
if (lineSX[0].x === p1.x && lineSX[0].y === p1.y || lineDX[1].x === p2.x && lineDX[1].y === p2.y) {
|
|
2157
|
+
sp = {
|
|
2158
|
+
x: lineSX[0].x,
|
|
2159
|
+
y: lineSX[0].y
|
|
2160
|
+
};
|
|
2161
|
+
ep = {
|
|
2162
|
+
x: lineDX[1].x,
|
|
2163
|
+
y: lineDX[1].y
|
|
2164
|
+
};
|
|
2165
|
+
} else {
|
|
2166
|
+
// srcLine Direction is reversed
|
|
2167
|
+
sp = {
|
|
2168
|
+
x: lineDX[1].x,
|
|
2169
|
+
y: lineDX[1].y
|
|
2170
|
+
};
|
|
2171
|
+
ep = {
|
|
2172
|
+
x: lineSX[0].x,
|
|
2173
|
+
y: lineSX[0].y
|
|
2159
2174
|
};
|
|
2160
2175
|
}
|
|
2161
|
-
// else {
|
|
2162
|
-
// // src includes dest
|
|
2163
|
-
// // return OVERLAP_SOME; // lineSX[1] - lineDX[1]
|
|
2164
|
-
// return {
|
|
2165
|
-
// result: OVERLAP_SOME,
|
|
2166
|
-
// trimmedSegs: {
|
|
2167
|
-
// x1: lineSX[1].x,
|
|
2168
|
-
// y1: lineSX[1].y,
|
|
2169
|
-
// x2: lineDX[1].x,
|
|
2170
|
-
// y2: lineDX[1].y
|
|
2171
|
-
// }
|
|
2172
|
-
// };
|
|
2173
|
-
// }
|
|
2174
|
-
}
|
|
2175
|
-
if (MathUtils.fAbs(compare1) < EPSILON) {
|
|
2176
|
-
// return OVERLAP_LINK; // lineSX[1]
|
|
2177
2176
|
return {
|
|
2178
2177
|
result: OVERLAP_LINK,
|
|
2179
2178
|
linkedLine: {
|
|
2180
|
-
x1:
|
|
2181
|
-
y1:
|
|
2182
|
-
x2:
|
|
2183
|
-
y2:
|
|
2179
|
+
x1: sp.x,
|
|
2180
|
+
y1: sp.y,
|
|
2181
|
+
x2: ep.x,
|
|
2182
|
+
y2: ep.y
|
|
2184
2183
|
}
|
|
2185
2184
|
};
|
|
2186
2185
|
} else if (compare1 < 0) {
|
|
2186
|
+
// SX
|
|
2187
|
+
// |----------|
|
|
2188
|
+
// DX
|
|
2189
|
+
// |----------|
|
|
2190
|
+
// none
|
|
2187
2191
|
return {
|
|
2188
2192
|
result: OVERLAP_NONE
|
|
2189
2193
|
};
|
|
2190
|
-
} else {
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2194
|
+
} else if (MathUtils.fAbs(compare0) < EPSILON && MathUtils.fAbs(compare2) < EPSILON) {
|
|
2195
|
+
// SX
|
|
2196
|
+
// |----------|
|
|
2197
|
+
// DX
|
|
2198
|
+
// |----------|
|
|
2199
|
+
return {
|
|
2200
|
+
result: OVERLAP_SAME
|
|
2201
|
+
};
|
|
2202
|
+
} else if (MathUtils.fAbs(compare0) < EPSILON) {
|
|
2203
|
+
if (compare2 < 0 && isReversedSrcLineIdx) {
|
|
2204
|
+
// SX
|
|
2205
|
+
// |---------------|
|
|
2206
|
+
// DX
|
|
2207
|
+
// |-----------------------|
|
|
2208
|
+
// DX includes SX, DX=srcLine, SX=destLine : sx1 - dx1
|
|
2209
|
+
if (lineDX[1].x === p2.x && lineDX[1].y === p2.y) {
|
|
2210
|
+
sp = {
|
|
2211
|
+
x: lineSX[1].x,
|
|
2212
|
+
y: lineSX[1].y
|
|
2213
|
+
};
|
|
2214
|
+
ep = {
|
|
2215
|
+
x: lineDX[1].x,
|
|
2216
|
+
y: lineDX[1].y
|
|
2217
|
+
};
|
|
2218
|
+
} else {
|
|
2219
|
+
// srcLine Direction is reversed
|
|
2220
|
+
sp = {
|
|
2221
|
+
x: lineDX[1].x,
|
|
2222
|
+
y: lineDX[1].y
|
|
2223
|
+
};
|
|
2224
|
+
ep = {
|
|
2225
|
+
x: lineSX[1].x,
|
|
2226
|
+
y: lineSX[1].y
|
|
2227
|
+
};
|
|
2228
|
+
}
|
|
2229
|
+
return {
|
|
2230
|
+
result: OVERLAP_SOME,
|
|
2231
|
+
trimmedSegs: [{
|
|
2232
|
+
x1: sp.x,
|
|
2233
|
+
y1: sp.y,
|
|
2234
|
+
x2: ep.x,
|
|
2235
|
+
y2: ep.y
|
|
2236
|
+
}]
|
|
2237
|
+
};
|
|
2238
|
+
} else if (compare2 > 0 && !isReversedSrcLineIdx) {
|
|
2239
|
+
// SX
|
|
2240
|
+
// |-----------------------|
|
|
2241
|
+
// DX
|
|
2242
|
+
// |---------------|
|
|
2243
|
+
// SX includes DX, SX=srcLine, DX=destLine : dx1 - sx1
|
|
2244
|
+
if (lineSX[1].x === p2.x && lineSX[1].y === p2.y) {
|
|
2245
|
+
sp = {
|
|
2246
|
+
x: lineDX[1].x,
|
|
2247
|
+
y: lineDX[1].y
|
|
2248
|
+
};
|
|
2249
|
+
ep = {
|
|
2250
|
+
x: lineSX[1].x,
|
|
2251
|
+
y: lineSX[1].y
|
|
2252
|
+
};
|
|
2253
|
+
} else {
|
|
2254
|
+
// srcLine Direction is reversed
|
|
2255
|
+
sp = {
|
|
2256
|
+
x: lineSX[1].x,
|
|
2257
|
+
y: lineSX[1].y
|
|
2258
|
+
};
|
|
2259
|
+
ep = {
|
|
2260
|
+
x: lineDX[1].x,
|
|
2261
|
+
y: lineDX[1].y
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
return {
|
|
2265
|
+
result: OVERLAP_SOME,
|
|
2266
|
+
trimmedSegs: [{
|
|
2267
|
+
x1: sp.x,
|
|
2268
|
+
y1: sp.y,
|
|
2269
|
+
x2: ep.x,
|
|
2270
|
+
y2: ep.y
|
|
2271
|
+
}]
|
|
2272
|
+
};
|
|
2273
|
+
} else {
|
|
2274
|
+
// srcLine
|
|
2275
|
+
// |---------------|
|
|
2276
|
+
// destLine
|
|
2277
|
+
// |-----------------------|
|
|
2278
|
+
// destLine includes srcLine
|
|
2279
|
+
return {
|
|
2280
|
+
result: OVERLAP_INCLUDED
|
|
2281
|
+
};
|
|
2282
|
+
}
|
|
2283
|
+
} else if (MathUtils.fAbs(compare2) < EPSILON) {
|
|
2284
|
+
// SX
|
|
2285
|
+
// |-----------------------|
|
|
2286
|
+
// DX
|
|
2287
|
+
// |------------------|
|
|
2288
|
+
if (isReversedSrcLineIdx) {
|
|
2289
|
+
// SX includes DX, DX=srcLine, SX=destLine
|
|
2290
|
+
// destLine includes srcLine
|
|
2291
|
+
return {
|
|
2292
|
+
result: OVERLAP_INCLUDED
|
|
2293
|
+
};
|
|
2294
|
+
} else {
|
|
2295
|
+
// SX includes DX, SX=srcLine, DX=destLine
|
|
2296
|
+
// srcLine incluedes destLine : sx0 - dx0
|
|
2297
|
+
if (lineSX[1].x === p2.x && lineSX[1].y === p2.y) {
|
|
2298
|
+
sp = {
|
|
2299
|
+
x: lineSX[0].x,
|
|
2300
|
+
y: lineSX[0].y
|
|
2301
|
+
};
|
|
2302
|
+
ep = {
|
|
2303
|
+
x: lineDX[0].x,
|
|
2304
|
+
y: lineDX[0].y
|
|
2305
|
+
};
|
|
2306
|
+
} else {
|
|
2307
|
+
// srcLine direction is reversed
|
|
2308
|
+
sp = {
|
|
2309
|
+
x: lineDX[0].x,
|
|
2310
|
+
y: lineDX[0].y
|
|
2311
|
+
};
|
|
2312
|
+
ep = {
|
|
2313
|
+
x: lineSX[0].x,
|
|
2314
|
+
y: lineSX[0].y
|
|
2315
|
+
};
|
|
2316
|
+
}
|
|
2317
|
+
return {
|
|
2318
|
+
result: OVERLAP_SOME,
|
|
2319
|
+
trimmedSegs: [{
|
|
2320
|
+
x1: sp.x,
|
|
2321
|
+
y1: sp.y,
|
|
2322
|
+
x2: ep.x,
|
|
2323
|
+
y2: ep.y
|
|
2324
|
+
}]
|
|
2325
|
+
};
|
|
2326
|
+
}
|
|
2327
|
+
} else if (compare0 < 0 && compare2 > 0) {
|
|
2328
|
+
// SX
|
|
2329
|
+
// |-----------------------|
|
|
2330
|
+
// DX
|
|
2331
|
+
// |----------------|
|
|
2332
|
+
if (isReversedSrcLineIdx) {
|
|
2333
|
+
// SX includes DX, DX=srcLine, SX=destLine
|
|
2334
|
+
// destLine includes srcLine
|
|
2335
|
+
return {
|
|
2336
|
+
result: OVERLAP_INCLUDED
|
|
2337
|
+
};
|
|
2338
|
+
} else {
|
|
2339
|
+
// SX includes DX, SX=srcLine, DX=destLine
|
|
2340
|
+
// srcLine incluedes destLine : sx0 - dx0, dx1 - sx1
|
|
2341
|
+
if (lineSX[1].x === p2.x && lineSX[1].y === p2.y) {
|
|
2196
2342
|
return {
|
|
2197
|
-
result:
|
|
2343
|
+
result: OVERLAP_SOME,
|
|
2344
|
+
trimmedSegs: [{
|
|
2345
|
+
x1: lineSX[0].x,
|
|
2346
|
+
y1: lineSX[0].y,
|
|
2347
|
+
x2: lineDX[0].x,
|
|
2348
|
+
y2: lineDX[0].y
|
|
2349
|
+
}, {
|
|
2350
|
+
x1: lineDX[1].x,
|
|
2351
|
+
y1: lineDX[1].y,
|
|
2352
|
+
x2: lineSX[1].x,
|
|
2353
|
+
y2: lineSX[1].y
|
|
2354
|
+
}]
|
|
2198
2355
|
};
|
|
2199
2356
|
} else {
|
|
2200
|
-
//
|
|
2201
|
-
var trimmedSegs = [];
|
|
2202
|
-
// return OVERLAP_SOME; // lineSX[0] - lineDX[0], lineDX[1] - lineSX[1]
|
|
2203
|
-
if (compare0 < 0) trimmedSegs.push({
|
|
2204
|
-
x1: isReversedSrcLineDirection ? lineDX[0].x : lineSX[0].x,
|
|
2205
|
-
y1: isReversedSrcLineDirection ? lineDX[0].y : lineSX[0].y,
|
|
2206
|
-
x2: isReversedSrcLineDirection ? lineSX[0].x : lineDX[0].x,
|
|
2207
|
-
y2: isReversedSrcLineDirection ? lineSX[0].y : lineDX[0].y
|
|
2208
|
-
});
|
|
2209
|
-
if (compare2 > 0) trimmedSegs.push({
|
|
2210
|
-
x1: isReversedSrcLineDirection ? lineSX[1].x : lineDX[1].x,
|
|
2211
|
-
y1: isReversedSrcLineDirection ? lineSX[1].y : lineDX[1].y,
|
|
2212
|
-
x2: isReversedSrcLineDirection ? lineDX[1].x : lineSX[1].x,
|
|
2213
|
-
y2: isReversedSrcLineDirection ? lineDX[1].y : lineSX[1].y
|
|
2214
|
-
});
|
|
2357
|
+
// srcLine direction is reversed
|
|
2215
2358
|
return {
|
|
2216
2359
|
result: OVERLAP_SOME,
|
|
2217
|
-
trimmedSegs:
|
|
2360
|
+
trimmedSegs: [{
|
|
2361
|
+
x1: lineDX[0].x,
|
|
2362
|
+
y1: lineDX[0].y,
|
|
2363
|
+
x2: lineSX[0].x,
|
|
2364
|
+
y2: lineSX[0].y
|
|
2365
|
+
}, {
|
|
2366
|
+
x1: lineSX[1].x,
|
|
2367
|
+
y1: lineSX[1].y,
|
|
2368
|
+
x2: lineDX[1].x,
|
|
2369
|
+
y2: lineDX[1].y
|
|
2370
|
+
}]
|
|
2218
2371
|
};
|
|
2219
2372
|
}
|
|
2220
2373
|
}
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2374
|
+
} else if (compare2 < 0) {
|
|
2375
|
+
// SX
|
|
2376
|
+
// |-----------------------|
|
|
2377
|
+
// DX
|
|
2378
|
+
// |----------------------------|
|
|
2379
|
+
// overlap some
|
|
2380
|
+
if (isReversedSrcLineIdx) {
|
|
2381
|
+
// DX=srcLine, SX=destLine
|
|
2382
|
+
if (lineDX[1].x === p2.x && lineDX[1].y === p2.y) {
|
|
2383
|
+
sp = {
|
|
2384
|
+
x: lineSX[1].x,
|
|
2385
|
+
y: lineSX[1].y
|
|
2386
|
+
};
|
|
2387
|
+
ep = {
|
|
2388
|
+
x: lineDX[1].x,
|
|
2389
|
+
y: lineDX[1].y
|
|
2390
|
+
};
|
|
2391
|
+
} else {
|
|
2392
|
+
// srcLine direction is reversed
|
|
2393
|
+
sp = {
|
|
2394
|
+
x: lineDX[1].x,
|
|
2395
|
+
y: lineDX[1].y
|
|
2396
|
+
};
|
|
2397
|
+
ep = {
|
|
2398
|
+
x: lineSX[1].x,
|
|
2399
|
+
y: lineSX[1].y
|
|
2400
|
+
};
|
|
2401
|
+
}
|
|
2402
|
+
return {
|
|
2403
|
+
result: OVERLAP_SOME,
|
|
2404
|
+
trimmedSegs: [{
|
|
2405
|
+
x1: sp.x,
|
|
2406
|
+
y1: sp.y,
|
|
2407
|
+
x2: ep.x,
|
|
2408
|
+
y2: ep.y
|
|
2409
|
+
}]
|
|
2410
|
+
};
|
|
2411
|
+
} else {
|
|
2412
|
+
// SX=srcLine, DX=destLine
|
|
2413
|
+
if (lineSX[1].x === p2.x && lineSX[1].y === p2.y) {
|
|
2414
|
+
sp = {
|
|
2415
|
+
x: lineSX[0].x,
|
|
2416
|
+
y: lineSX[0].y
|
|
2417
|
+
};
|
|
2418
|
+
ep = {
|
|
2419
|
+
x: lineDX[0].x,
|
|
2420
|
+
y: lineDX[0].y
|
|
2421
|
+
};
|
|
2422
|
+
} else {
|
|
2423
|
+
// srcLine direction is reversed
|
|
2424
|
+
sp = {
|
|
2425
|
+
x: lineDX[0].x,
|
|
2426
|
+
y: lineDX[0].y
|
|
2427
|
+
};
|
|
2428
|
+
ep = {
|
|
2429
|
+
x: lineSX[0].x,
|
|
2430
|
+
y: lineSX[0].y
|
|
2431
|
+
};
|
|
2432
|
+
}
|
|
2236
2433
|
return {
|
|
2237
2434
|
result: OVERLAP_SOME,
|
|
2238
|
-
trimmedSegs:
|
|
2435
|
+
trimmedSegs: [{
|
|
2436
|
+
x1: sp.x,
|
|
2437
|
+
y1: sp.y,
|
|
2438
|
+
x2: ep.x,
|
|
2439
|
+
y2: ep.y
|
|
2440
|
+
}]
|
|
2239
2441
|
};
|
|
2240
2442
|
}
|
|
2241
2443
|
}
|
package/es/utils/history.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Map, List } from 'immutable';
|
|
2
2
|
import diff from 'immutablediff';
|
|
3
3
|
import patch from 'immutablepatch';
|
|
4
4
|
export var historyPush = function historyPush(historyStructure, item) {
|
|
@@ -11,7 +11,7 @@ export var historyPush = function historyPush(historyStructure, item) {
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
// convert map to object of the [value] field
|
|
14
|
-
if (List.isList(toPush.get('diff')) && ((_toPush$get = toPush.get('diff')) === null || _toPush$get === void 0 ? void 0 : _toPush$get.size) >
|
|
14
|
+
if (List.isList(toPush.get('diff')) && ((_toPush$get = toPush.get('diff')) === null || _toPush$get === void 0 ? void 0 : _toPush$get.size) > 0) {
|
|
15
15
|
for (var i = 0; i < toPush.get('diff').size; i++) {
|
|
16
16
|
var mapValue = toPush.get('diff').get(i).get('value');
|
|
17
17
|
if (Map.isMap(mapValue)) {
|
package/es/utils/molding.js
CHANGED
|
@@ -248,8 +248,9 @@ export function getLinesOfItem(item, allLineRects, catalog) {
|
|
|
248
248
|
var hUnit = item.properties.get('depth').get('_unit') || 'cm';
|
|
249
249
|
newDepth = convert(newDepth).from(hUnit).to('cm');
|
|
250
250
|
if (item) {
|
|
251
|
+
var _element;
|
|
251
252
|
// Get Outline Data of Selected Item
|
|
252
|
-
outline = element.info.outline;
|
|
253
|
+
outline = (_element = element) === null || _element === void 0 || (_element = _element.info) === null || _element === void 0 ? void 0 : _element.outline;
|
|
253
254
|
if (outline) {
|
|
254
255
|
// Extract Points from `outline`
|
|
255
256
|
var outlinePaths = outline.paths;
|
|
@@ -319,9 +320,9 @@ export function getLinesOfItem2(item, allLineRects, catalog) {
|
|
|
319
320
|
var hUnit = item.properties.get('depth').get('_unit') || 'cm';
|
|
320
321
|
newDepth = convert(newDepth).from(hUnit).to('cm');
|
|
321
322
|
if (item) {
|
|
322
|
-
var
|
|
323
|
+
var _element2;
|
|
323
324
|
// Get Outline Data of Selected Item
|
|
324
|
-
outline = (
|
|
325
|
+
outline = (_element2 = element) === null || _element2 === void 0 ? void 0 : _element2.info.outline;
|
|
325
326
|
if (outline) {
|
|
326
327
|
// Extract Points from `outline`
|
|
327
328
|
var outlinePaths = outline.paths;
|
|
@@ -429,6 +430,7 @@ export function getLinesFromItems2(moldingGroup, layer, catalog) {
|
|
|
429
430
|
var MGlines = [];
|
|
430
431
|
var MGlinesOtherSnapped = [];
|
|
431
432
|
var items = _toConsumableArray(moldingGroup.items);
|
|
433
|
+
items = sortItemsByDistance(items, items[0]);
|
|
432
434
|
// The other item's lines (these items are snapped to the moldingGroup items)
|
|
433
435
|
var itemsOtherSnapped = layer.items.toArray().filter(function (item) {
|
|
434
436
|
if (items.some(function (it) {
|
|
@@ -563,23 +565,7 @@ export function getLinesFromItems2(moldingGroup, layer, catalog) {
|
|
|
563
565
|
})) return 1; // continue
|
|
564
566
|
var mergedResult = getMergedLine(MGlines[_i3], filteredMGlines, 0);
|
|
565
567
|
if (mergedResult) {
|
|
566
|
-
|
|
567
|
-
var rstLine = mergedResult.mergedLine;
|
|
568
|
-
// if (
|
|
569
|
-
// (Math.abs(MGlines[i][0].x - rstLine[1].x) < EPSILON &&
|
|
570
|
-
// Math.abs(MGlines[i][0].y - rstLine[1].y) < EPSILON) ||
|
|
571
|
-
// (Math.abs(MGlines[i][1].x - rstLine[0].x) < EPSILON &&
|
|
572
|
-
// Math.abs(MGlines[i][1].y - rstLine[0].y) < EPSILON)
|
|
573
|
-
// ) {
|
|
574
|
-
// // swap two end points
|
|
575
|
-
// const tx = rstLine[0].x;
|
|
576
|
-
// const ty = rstLine[0].y;
|
|
577
|
-
// rstLine[0].x = rstLine[1].x;
|
|
578
|
-
// rstLine[0].y = rstLine[1].y;
|
|
579
|
-
// rstLine[1].x = tx;
|
|
580
|
-
// rstLine[1].y = ty;
|
|
581
|
-
// }
|
|
582
|
-
newMGlines.push(rstLine);
|
|
568
|
+
newMGlines.push(mergedResult.mergedLine);
|
|
583
569
|
filteredMGlines = mergedResult.filteredMGlines;
|
|
584
570
|
}
|
|
585
571
|
},
|
|
@@ -30,7 +30,7 @@ var _export2 = require("./components/export");
|
|
|
30
30
|
var _translator = _interopRequireDefault(require("./translator/translator"));
|
|
31
31
|
var _objectsUtils = require("./utils/objects-utils");
|
|
32
32
|
var _version = require("./version");
|
|
33
|
-
var
|
|
33
|
+
var _handleExternalEvent = require("./events/external/handleExternalEvent");
|
|
34
34
|
var _excluded = ["width", "height", "extractedState"];
|
|
35
35
|
var _templateObject, _templateObject2; // LiteKitchenConfigurator.jsx
|
|
36
36
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -360,7 +360,7 @@ var LiteKitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
360
360
|
|
|
361
361
|
// same behavior: handle external event when it changes
|
|
362
362
|
if (prevProps.externalEvent !== externalEvent) {
|
|
363
|
-
(0,
|
|
363
|
+
(0, _handleExternalEvent.handleExternalEvent)(this.props);
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
// same behavior: init catalog until ready
|