kitchen-simulator 1.1.1-test.62 → 1.1.1-test.64
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/@history.js +2 -10
- package/es/AppContext.js +3 -10
- package/es/KitchenConfigurator.js +70 -79
- package/es/KitchenConfiguratorApp.js +98 -107
- package/es/actions/area-actions.js +5 -12
- package/es/actions/export.js +12 -29
- package/es/actions/groups-actions.js +27 -45
- package/es/actions/holes-actions.js +34 -55
- package/es/actions/items-actions.js +94 -145
- package/es/actions/lines-actions.js +21 -36
- package/es/actions/project-actions.js +94 -145
- package/es/actions/scene-actions.js +11 -21
- package/es/actions/vertices-actions.js +7 -15
- package/es/actions/viewer2d-actions.js +21 -36
- package/es/actions/viewer3d-actions.js +9 -18
- package/es/catalog/areas/area/planner-element.js +2 -9
- package/es/catalog/catalog.js +15 -21
- package/es/catalog/factories/area-factory-3d.js +22 -31
- package/es/catalog/factories/area-factory.js +11 -20
- package/es/catalog/factories/export.js +6 -24
- package/es/catalog/factories/wall-factory-3d.js +31 -41
- package/es/catalog/factories/wall-factory.js +21 -31
- package/es/catalog/holes/door-closet/planner-element.js +15 -24
- package/es/catalog/holes/door-double/planner-element.js +15 -24
- package/es/catalog/holes/door-exterior/planner-element.js +16 -25
- package/es/catalog/holes/door-interior/planner-element.js +16 -25
- package/es/catalog/holes/door-panic/planner-element.js +7 -16
- package/es/catalog/holes/door-panic-double/planner-element.js +15 -24
- package/es/catalog/holes/door-sliding/planner-element.js +16 -25
- package/es/catalog/holes/doorway-framed/planner-element.js +11 -20
- package/es/catalog/holes/doorway-frameless/planner-element.js +7 -16
- package/es/catalog/holes/export.js +13 -97
- package/es/catalog/holes/window-clear/planner-element.js +10 -19
- package/es/catalog/holes/window-cross/planner-element.js +10 -19
- package/es/catalog/holes/window-double-hung/planner-element.js +10 -19
- package/es/catalog/holes/window-vertical/planner-element.js +10 -19
- package/es/catalog/lines/wall/planner-element.js +2 -9
- package/es/catalog/molding/molding-dcm/planner-element.js +5 -14
- package/es/catalog/molding/molding-fbm/planner-element.js +5 -14
- package/es/catalog/molding/molding-lrm/planner-element.js +5 -14
- package/es/catalog/properties/export.js +20 -80
- package/es/catalog/properties/property-checkbox.js +24 -31
- package/es/catalog/properties/property-color.js +16 -23
- package/es/catalog/properties/property-enum.js +24 -31
- package/es/catalog/properties/property-hidden.js +9 -16
- package/es/catalog/properties/property-lenght-measure.js +38 -45
- package/es/catalog/properties/property-length-measure.js +36 -43
- package/es/catalog/properties/property-length-measure_hole.js +38 -45
- package/es/catalog/properties/property-number.js +17 -24
- package/es/catalog/properties/property-read-only.js +16 -23
- package/es/catalog/properties/property-string.js +16 -23
- package/es/catalog/properties/property-toggle.js +16 -23
- package/es/catalog/properties/shared-property-style.js +1 -7
- package/es/catalog/utils/FuseUtils.js +8 -15
- package/es/catalog/utils/exporter.js +8 -15
- package/es/catalog/utils/geom-utils.js +13 -29
- package/es/catalog/utils/item-loader.js +84 -97
- package/es/catalog/utils/load-obj.js +20 -28
- package/es/catalog/utils/mtl-loader.js +3 -8
- package/es/catalog/utils/obj-loader.js +3 -8
- package/es/class/FuseUtils.js +8 -15
- package/es/class/area.js +22 -28
- package/es/class/export.js +23 -95
- package/es/class/group.js +53 -59
- package/es/class/guide.js +15 -21
- package/es/class/hole.js +83 -89
- package/es/class/item.js +141 -147
- package/es/class/layer.js +59 -65
- package/es/class/line.js +135 -143
- package/es/class/project.js +90 -98
- package/es/class/vertex.js +29 -35
- package/es/components/content.js +19 -28
- package/es/components/disclaimer/disclaimer.js +10 -18
- package/es/components/export.js +8 -32
- package/es/components/style/button.js +23 -31
- package/es/components/style/cancel-button.js +7 -14
- package/es/components/style/content-container.js +9 -16
- package/es/components/style/content-title.js +11 -20
- package/es/components/style/delete-button.js +8 -17
- package/es/components/style/export.js +30 -120
- package/es/components/style/form-block.js +8 -15
- package/es/components/style/form-color-input.js +7 -14
- package/es/components/style/form-label.js +8 -15
- package/es/components/style/form-number-input.js +41 -49
- package/es/components/style/form-number-input_2.js +36 -44
- package/es/components/style/form-select.js +17 -24
- package/es/components/style/form-slider.js +10 -17
- package/es/components/style/form-submit-button.js +8 -17
- package/es/components/style/form-text-input.js +26 -34
- package/es/components/viewer2d/area.js +17 -24
- package/es/components/viewer2d/export.js +30 -120
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +10 -17
- package/es/components/viewer2d/grids/grid-streak.js +10 -17
- package/es/components/viewer2d/grids/grid-vertical-streak.js +10 -17
- package/es/components/viewer2d/grids/grids.js +10 -19
- package/es/components/viewer2d/group.js +15 -24
- package/es/components/viewer2d/item.js +61 -70
- package/es/components/viewer2d/layer.js +23 -30
- package/es/components/viewer2d/line.js +101 -111
- package/es/components/viewer2d/ruler.js +22 -29
- package/es/components/viewer2d/rulerDist.js +21 -28
- package/es/components/viewer2d/rulerX.js +39 -47
- package/es/components/viewer2d/rulerY.js +37 -45
- package/es/components/viewer2d/scene.js +30 -38
- package/es/components/viewer2d/snap.js +13 -22
- package/es/components/viewer2d/state.js +18 -27
- package/es/components/viewer2d/utils.js +24 -37
- package/es/components/viewer2d/vertex.js +8 -17
- package/es/components/viewer2d/viewer2d.js +153 -163
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +17 -23
- package/es/components/viewer3d/dcm.js +1 -7
- package/es/components/viewer3d/fbm.js +1 -7
- package/es/components/viewer3d/front3D.js +12 -21
- package/es/components/viewer3d/grid-creator.js +8 -17
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +6 -14
- package/es/components/viewer3d/grids/grid-streak.js +5 -13
- package/es/components/viewer3d/grids/grid-vertical-streak.js +6 -14
- package/es/components/viewer3d/libs/first-person-controls.js +2 -9
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1 -7
- package/es/components/viewer3d/libs/mtl-loader.js +1 -7
- package/es/components/viewer3d/libs/obj-loader.js +1 -7
- package/es/components/viewer3d/libs/orbit-controls.js +2 -8
- package/es/components/viewer3d/libs/pointer-lock-controls.js +2 -8
- package/es/components/viewer3d/lrm.js +1 -7
- package/es/components/viewer3d/model.js +1 -7
- package/es/components/viewer3d/pointer-lock-navigation.js +3 -10
- package/es/components/viewer3d/ruler-utils/itemRect.js +18 -25
- package/es/components/viewer3d/ruler-utils/layer3D.js +59 -66
- package/es/components/viewer3d/ruler-utils/ruler3D.js +39 -46
- package/es/components/viewer3d/ruler-utils/scene3D.js +9 -17
- package/es/components/viewer3d/ruler-utils/state3D.js +4 -11
- package/es/components/viewer3d/scene-creator.js +191 -226
- package/es/components/viewer3d/three-memory-cleaner.js +3 -12
- package/es/components/viewer3d/viewer3d-first-person.js +40 -46
- package/es/components/viewer3d/viewer3d.js +196 -202
- package/es/constants.js +349 -358
- package/es/index.js +7 -15
- package/es/models.js +177 -184
- package/es/plugins/SVGLoader.js +48 -53
- package/es/plugins/autosave.js +3 -9
- package/es/plugins/console-debugger.js +5 -12
- package/es/plugins/export.js +8 -32
- package/es/plugins/keyboard.js +29 -35
- package/es/reducers/areas-reducer.js +7 -13
- package/es/reducers/export.js +24 -96
- package/es/reducers/groups-reducer.js +31 -37
- package/es/reducers/holes-reducer.js +43 -49
- package/es/reducers/items-reducer.js +106 -112
- package/es/reducers/lines-reducer.js +28 -34
- package/es/reducers/project-reducer.js +105 -111
- package/es/reducers/reducer.js +16 -23
- package/es/reducers/scene-reducer.js +15 -21
- package/es/reducers/user-reducer.js +5 -11
- package/es/reducers/vertices-reducer.js +11 -17
- package/es/reducers/viewer2d-reducer.js +18 -24
- package/es/reducers/viewer3d-reducer.js +16 -22
- package/es/shared-style.js +10 -16
- package/es/styles/export.js +3 -11
- package/es/translator/en.js +1 -7
- package/es/translator/it.js +1 -7
- package/es/translator/ru.js +1 -7
- package/es/translator/translator.js +13 -19
- package/es/utils/browser.js +2 -9
- package/es/utils/convert-units-lite.js +1 -7
- package/es/utils/email-validator.js +1 -7
- package/es/utils/export.js +15 -46
- package/es/utils/geometry.js +181 -278
- package/es/utils/get-edges-of-subgraphs.js +2 -9
- package/es/utils/graph-cycles.js +8 -11
- package/es/utils/graph-inner-cycles.js +10 -18
- package/es/utils/graph.js +9 -17
- package/es/utils/helper.js +39 -63
- package/es/utils/history.js +8 -15
- package/es/utils/id-broker.js +8 -15
- package/es/utils/logger.js +1 -7
- package/es/utils/math.js +5 -12
- package/es/utils/molding.js +119 -144
- package/es/utils/name-generator.js +7 -13
- package/es/utils/objects-utils.js +7 -19
- package/es/utils/phone-validator.js +1 -7
- package/es/utils/process-black-list.js +3 -10
- package/es/utils/react-if.js +6 -12
- package/es/utils/snap-scene.js +27 -34
- package/es/utils/snap.js +45 -59
- package/es/utils/summarizeCart.js +1 -7
- package/es/utils/threeCSG.es6.js +13 -22
- package/es/version.js +1 -7
- package/lib/@history.js +2 -1
- package/lib/AppContext.js +2 -1
- package/lib/KitchenConfigurator.js +2 -1
- package/lib/KitchenConfiguratorApp.js +2 -1
- package/lib/catalog/areas/area/planner-element.js +2 -1
- package/lib/catalog/catalog.js +2 -1
- package/lib/catalog/factories/area-factory.js +2 -1
- package/lib/catalog/factories/wall-factory.js +2 -1
- package/lib/catalog/holes/door-closet/planner-element.js +2 -1
- package/lib/catalog/holes/door-double/planner-element.js +2 -1
- package/lib/catalog/holes/door-exterior/planner-element.js +2 -1
- package/lib/catalog/holes/door-interior/planner-element.js +2 -1
- package/lib/catalog/holes/door-panic/planner-element.js +2 -1
- package/lib/catalog/holes/door-panic-double/planner-element.js +2 -1
- package/lib/catalog/holes/door-sliding/planner-element.js +2 -1
- package/lib/catalog/holes/doorway-framed/planner-element.js +2 -1
- package/lib/catalog/holes/doorway-frameless/planner-element.js +2 -1
- package/lib/catalog/holes/window-clear/planner-element.js +2 -1
- package/lib/catalog/holes/window-cross/planner-element.js +2 -1
- package/lib/catalog/holes/window-double-hung/planner-element.js +2 -1
- package/lib/catalog/holes/window-vertical/planner-element.js +2 -1
- package/lib/catalog/lines/wall/planner-element.js +2 -1
- package/lib/catalog/molding/molding-dcm/planner-element.js +2 -1
- package/lib/catalog/molding/molding-fbm/planner-element.js +2 -1
- package/lib/catalog/molding/molding-lrm/planner-element.js +2 -1
- package/lib/catalog/properties/property-checkbox.js +2 -1
- package/lib/catalog/properties/property-color.js +2 -1
- package/lib/catalog/properties/property-enum.js +2 -1
- package/lib/catalog/properties/property-hidden.js +2 -1
- package/lib/catalog/properties/property-lenght-measure.js +2 -1
- package/lib/catalog/properties/property-length-measure.js +2 -1
- package/lib/catalog/properties/property-length-measure_hole.js +2 -1
- package/lib/catalog/properties/property-number.js +2 -1
- package/lib/catalog/properties/property-read-only.js +2 -1
- package/lib/catalog/properties/property-string.js +2 -1
- package/lib/catalog/properties/property-toggle.js +2 -1
- package/lib/catalog/properties/shared-property-style.js +2 -1
- package/lib/catalog/utils/FuseUtils.js +2 -1
- package/lib/catalog/utils/exporter.js +2 -1
- package/lib/class/FuseUtils.js +2 -1
- package/lib/class/area.js +2 -1
- package/lib/class/group.js +2 -1
- package/lib/class/hole.js +2 -1
- package/lib/class/item.js +2 -1
- package/lib/class/layer.js +2 -1
- package/lib/class/line.js +2 -1
- package/lib/class/project.js +2 -1
- package/lib/class/vertex.js +2 -1
- package/lib/components/content.js +2 -1
- package/lib/components/disclaimer/disclaimer.js +2 -1
- package/lib/components/style/button.js +2 -1
- package/lib/components/style/cancel-button.js +2 -1
- package/lib/components/style/content-container.js +2 -1
- package/lib/components/style/content-title.js +2 -1
- package/lib/components/style/delete-button.js +2 -1
- package/lib/components/style/form-block.js +2 -1
- package/lib/components/style/form-color-input.js +2 -1
- package/lib/components/style/form-label.js +2 -1
- package/lib/components/style/form-number-input.js +2 -1
- package/lib/components/style/form-number-input_2.js +2 -1
- package/lib/components/style/form-select.js +2 -1
- package/lib/components/style/form-slider.js +2 -1
- package/lib/components/style/form-submit-button.js +2 -1
- package/lib/components/style/form-text-input.js +2 -1
- package/lib/components/viewer2d/area.js +2 -1
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +2 -1
- package/lib/components/viewer2d/grids/grid-streak.js +2 -1
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +2 -1
- package/lib/components/viewer2d/grids/grids.js +2 -1
- package/lib/components/viewer2d/group.js +2 -1
- package/lib/components/viewer2d/item.js +2 -1
- package/lib/components/viewer2d/layer.js +2 -1
- package/lib/components/viewer2d/ruler.js +2 -1
- package/lib/components/viewer2d/rulerDist.js +2 -1
- package/lib/components/viewer2d/rulerX.js +2 -1
- package/lib/components/viewer2d/rulerY.js +2 -1
- package/lib/components/viewer2d/scene.js +2 -1
- package/lib/components/viewer2d/snap.js +2 -1
- package/lib/components/viewer2d/state.js +2 -1
- package/lib/components/viewer2d/vertex.js +2 -1
- package/lib/components/viewer2d/viewer2d.js +2 -1
- package/lib/components/viewer3d/dcm.js +2 -1
- package/lib/components/viewer3d/fbm.js +2 -1
- package/lib/components/viewer3d/front3D.js +2 -1
- package/lib/components/viewer3d/grid-creator.js +2 -1
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +2 -1
- package/lib/components/viewer3d/grids/grid-streak.js +2 -1
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +2 -1
- package/lib/components/viewer3d/libs/mtl-loader.js +2 -1
- package/lib/components/viewer3d/libs/obj-loader.js +2 -1
- package/lib/components/viewer3d/lrm.js +2 -1
- package/lib/components/viewer3d/ruler-utils/itemRect.js +2 -1
- package/lib/components/viewer3d/ruler-utils/layer3D.js +2 -1
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +2 -1
- package/lib/components/viewer3d/ruler-utils/state3D.js +2 -1
- package/lib/components/viewer3d/viewer3d-first-person.js +2 -1
- package/lib/components/viewer3d/viewer3d.js +2 -1
- package/lib/plugins/autosave.js +2 -1
- package/lib/plugins/console-debugger.js +2 -1
- package/lib/plugins/keyboard.js +2 -1
- package/lib/reducers/areas-reducer.js +2 -1
- package/lib/reducers/groups-reducer.js +2 -1
- package/lib/reducers/holes-reducer.js +2 -1
- package/lib/reducers/items-reducer.js +2 -1
- package/lib/reducers/lines-reducer.js +2 -1
- package/lib/reducers/project-reducer.js +2 -1
- package/lib/reducers/scene-reducer.js +2 -1
- package/lib/reducers/user-reducer.js +2 -1
- package/lib/reducers/vertices-reducer.js +2 -1
- package/lib/reducers/viewer2d-reducer.js +2 -1
- package/lib/reducers/viewer3d-reducer.js +2 -1
- package/lib/translator/en.js +2 -1
- package/lib/translator/it.js +2 -1
- package/lib/translator/ru.js +2 -1
- package/lib/translator/translator.js +2 -1
- package/lib/utils/name-generator.js +2 -1
- package/lib/utils/react-if.js +2 -1
- package/lib/utils/threeCSG.es6.js +2 -1
- package/package.json +2 -1
|
@@ -1,67 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _export = require("../class/export");
|
|
8
|
-
var _export2 = require("../utils/export");
|
|
9
|
-
var _constants = require("../constants");
|
|
10
|
-
function _default(state, action) {
|
|
1
|
+
import { Hole } from "../class/export";
|
|
2
|
+
import { history } from "../utils/export";
|
|
3
|
+
import { BEGIN_DRAGGING_HOLE, BEGIN_DRAGGING_HOLE_3D, END_CREATING_HOLE, END_DRAGGING_HOLE, END_DRAGGING_HOLE_3D, END_DRAWING_HOLE, END_DRAWING_HOLE_3D, SELECT_HOLE, SELECT_TOOL_DRAWING_HOLE, SELECT_TOOL_DRAWING_HOLE_3D, UPDATE_DRAGGING_HOLE, UPDATE_DRAGGING_HOLE_CHANGED, UPDATE_DRAGGING_HOLE_RULER_CHANGED, UPDATE_DRAWING_HOLE, UPDATE_DRAWING_HOLE_3D, UPDATE_POPUP_OPEN } from "../constants";
|
|
4
|
+
export default function (state, action) {
|
|
11
5
|
switch (action.type) {
|
|
12
|
-
case
|
|
13
|
-
return
|
|
14
|
-
case
|
|
15
|
-
return
|
|
16
|
-
case
|
|
17
|
-
return
|
|
18
|
-
case
|
|
19
|
-
return
|
|
20
|
-
case
|
|
6
|
+
case UPDATE_DRAGGING_HOLE_RULER_CHANGED:
|
|
7
|
+
return Hole.updateDraggingHoleRulerChanged(state, action.width, action.layerID, action.holeID).updatedState;
|
|
8
|
+
case UPDATE_DRAGGING_HOLE_CHANGED:
|
|
9
|
+
return Hole.updateDraggingHoleChanged(state, action.x, action.y, action.layerID, action.holeID).updatedState;
|
|
10
|
+
case END_CREATING_HOLE:
|
|
11
|
+
return Hole.endCreatingHole(state).updatedState;
|
|
12
|
+
case UPDATE_POPUP_OPEN:
|
|
13
|
+
return Hole.updatePopupOpen(state, action.value).updatedState;
|
|
14
|
+
case SELECT_TOOL_DRAWING_HOLE:
|
|
21
15
|
state = state.merge({
|
|
22
|
-
sceneHistory:
|
|
16
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
23
17
|
});
|
|
24
|
-
return
|
|
25
|
-
case
|
|
26
|
-
return
|
|
27
|
-
case
|
|
28
|
-
return
|
|
29
|
-
case
|
|
30
|
-
return
|
|
31
|
-
case
|
|
18
|
+
return Hole.selectToolDrawingHole(state, action.sceneComponentType).updatedState;
|
|
19
|
+
case SELECT_TOOL_DRAWING_HOLE_3D:
|
|
20
|
+
return Hole.selectToolDrawingHole3D(state, action.sceneComponentType).updatedState;
|
|
21
|
+
case UPDATE_DRAWING_HOLE:
|
|
22
|
+
return Hole.updateDrawingHole(state, action.layerID, action.x, action.y).updatedState;
|
|
23
|
+
case UPDATE_DRAWING_HOLE_3D:
|
|
24
|
+
return Hole.updateDrawingHole3D(state, action.layerID, action.x, action.y).updatedState;
|
|
25
|
+
case END_DRAWING_HOLE:
|
|
32
26
|
state = state.merge({
|
|
33
|
-
sceneHistory:
|
|
27
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
34
28
|
});
|
|
35
|
-
return
|
|
36
|
-
case
|
|
29
|
+
return Hole.endDrawingHole(state, action.layerID, action.x, action.y).updatedState;
|
|
30
|
+
case END_DRAWING_HOLE_3D:
|
|
37
31
|
state = state.merge({
|
|
38
|
-
sceneHistory:
|
|
32
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
39
33
|
});
|
|
40
|
-
return
|
|
41
|
-
case
|
|
34
|
+
return Hole.endDrawingHole3D(state, action.layerID, action.x, action.y).updatedState;
|
|
35
|
+
case BEGIN_DRAGGING_HOLE:
|
|
42
36
|
state = state.merge({
|
|
43
|
-
sceneHistory:
|
|
37
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
44
38
|
});
|
|
45
|
-
return
|
|
46
|
-
case
|
|
39
|
+
return Hole.beginDraggingHole(state, action.layerID, action.holeID, action.x, action.y).updatedState;
|
|
40
|
+
case BEGIN_DRAGGING_HOLE_3D:
|
|
47
41
|
state = state.merge({
|
|
48
|
-
sceneHistory:
|
|
42
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
49
43
|
});
|
|
50
|
-
return
|
|
51
|
-
case
|
|
52
|
-
return
|
|
53
|
-
case
|
|
44
|
+
return Hole.beginDraggingHole3D(state, action.layerID, action.holeID, action.x, action.y).updatedState;
|
|
45
|
+
case UPDATE_DRAGGING_HOLE:
|
|
46
|
+
return Hole.updateDraggingHole(state, action.x, action.y).updatedState;
|
|
47
|
+
case END_DRAGGING_HOLE:
|
|
54
48
|
state = state.merge({
|
|
55
|
-
sceneHistory:
|
|
49
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
56
50
|
});
|
|
57
|
-
return
|
|
58
|
-
case
|
|
51
|
+
return Hole.endDraggingHole(state, action.x, action.y).updatedState;
|
|
52
|
+
case END_DRAGGING_HOLE_3D:
|
|
59
53
|
state = state.merge({
|
|
60
|
-
sceneHistory:
|
|
54
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
61
55
|
});
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return
|
|
56
|
+
return Hole.endDraggingHole3D(state, action.x, action.y).updatedState;
|
|
57
|
+
case SELECT_HOLE:
|
|
58
|
+
return Hole.select(state, action.layerID, action.holeID).updatedState;
|
|
65
59
|
default:
|
|
66
60
|
return state;
|
|
67
61
|
}
|
|
@@ -1,141 +1,135 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _export = require("../class/export");
|
|
8
|
-
var _export2 = require("../utils/export");
|
|
9
|
-
var _constants = require("../constants");
|
|
10
|
-
function _default(state, action) {
|
|
1
|
+
import { Item } from "../class/export";
|
|
2
|
+
import { history } from "../utils/export";
|
|
3
|
+
import { ANIMATE_OBJECT, BEGIN_DRAGGING_ITEM, BEGIN_DRAGGING_ITEM_3D, BEGIN_ROTATING_ITEM, BEGIN_ROTATING_ITEM_3D, DUPLICATE_SELECTED, EDIT_WIDTH, END_CREATING_CABINET, END_DRAGGING_ITEM, END_DRAGGING_ITEM_3D, END_DRAWING_ITEM, END_LOADING, END_ROTATING_ITEM, END_ROTATING_ITEM_3D, ITEM_MOVE_UP, REMOVE_REPLACE_SUBMODULE, REPLACE_ITEM, REPLACE_SUBMODULE, SELECT_ITEM, SELECT_TOOL_DRAWING_ITEM, SELECT_TOOL_DRAWING_ITEM_3D, SET_APPLIANCE_MATERIAL, SET_BACKSPLASH, SET_BACKSPLASH_VISIBLE, SET_COUNTER_TOP, SET_DOOR_HANDLE, SET_DOOR_STYLE, SET_HANDLE_MATERIAL, SET_INITIAL_DOOR_STYLE, SET_MODELLING, SET_MOLDING, SET_WALL_COLOR, STORE_DIST_ARRAY, TOGGLE_LOADING_CABINET, UPDATE_DRAGGING_ITEM, UPDATE_DRAGGING_ITEM_3DX, UPDATE_DRAGGING_ITEM_3DY, UPDATE_DRAGGING_ITEM_CHANGED, UPDATE_DRAWING_ITEM, UPDATE_ITEM_POSITION, UPDATE_MOLDING, UPDATE_POPUP_OPEN, UPDATE_ROTATING_ITEM, UPDATE_ROTATING_ITEM_CHANGED, VALIDATE_ITEM_POSTIONS } from "../constants";
|
|
4
|
+
export default function (state, action) {
|
|
11
5
|
switch (action.type) {
|
|
12
|
-
case
|
|
13
|
-
return
|
|
14
|
-
case
|
|
15
|
-
return
|
|
16
|
-
case
|
|
17
|
-
return
|
|
18
|
-
case
|
|
19
|
-
return
|
|
20
|
-
case
|
|
21
|
-
return
|
|
22
|
-
case
|
|
23
|
-
return
|
|
24
|
-
case
|
|
25
|
-
return
|
|
26
|
-
case
|
|
27
|
-
return
|
|
28
|
-
case
|
|
29
|
-
return
|
|
30
|
-
case
|
|
6
|
+
case STORE_DIST_ARRAY:
|
|
7
|
+
return Item.storeDistArray(state, action.layerID, action.itemID, action.distArray).updatedState;
|
|
8
|
+
case VALIDATE_ITEM_POSTIONS:
|
|
9
|
+
return Item.validateItemPositions(state, action.layerID).updatedState;
|
|
10
|
+
case END_LOADING:
|
|
11
|
+
return Item.endLoading(state).updatedState;
|
|
12
|
+
case TOGGLE_LOADING_CABINET:
|
|
13
|
+
return Item.toggleLoadingCabinet(state).updatedState;
|
|
14
|
+
case EDIT_WIDTH:
|
|
15
|
+
return Item.editWidth(state, action.newWidth, action.layerID, action.itemID).updatedState;
|
|
16
|
+
case DUPLICATE_SELECTED:
|
|
17
|
+
return Item.duplicateSelected(state, action.currentObject).updatedState;
|
|
18
|
+
case END_CREATING_CABINET:
|
|
19
|
+
return Item.endCreatingCabinet(state).updatedState;
|
|
20
|
+
case UPDATE_POPUP_OPEN:
|
|
21
|
+
return Item.updatePopupOpen(state, action.value).updatedState;
|
|
22
|
+
case SELECT_ITEM:
|
|
23
|
+
return Item.select(state, action.layerID, action.itemID).updatedState;
|
|
24
|
+
case SELECT_TOOL_DRAWING_ITEM:
|
|
31
25
|
state = state.merge({
|
|
32
|
-
sceneHistory:
|
|
26
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
33
27
|
});
|
|
34
|
-
return
|
|
35
|
-
case
|
|
36
|
-
return
|
|
37
|
-
case
|
|
38
|
-
return
|
|
39
|
-
case
|
|
28
|
+
return Item.selectToolDrawingItem(state, action.sceneComponentType, action.oStyle).updatedState;
|
|
29
|
+
case REPLACE_ITEM:
|
|
30
|
+
return Item.replaceItem(state, action.selectedPos, action.currentObject, action.selectedObject).updatedState;
|
|
31
|
+
case UPDATE_DRAWING_ITEM:
|
|
32
|
+
return Item.updateDrawingItem(state, action.layerID, action.x, action.y).updatedState;
|
|
33
|
+
case END_DRAWING_ITEM:
|
|
40
34
|
state = state.merge({
|
|
41
|
-
sceneHistory:
|
|
35
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
42
36
|
});
|
|
43
|
-
return
|
|
44
|
-
case
|
|
37
|
+
return Item.endDrawingItem(state, action.layerID, action.x, action.y).updatedState;
|
|
38
|
+
case BEGIN_DRAGGING_ITEM:
|
|
45
39
|
state = state.merge({
|
|
46
|
-
sceneHistory:
|
|
40
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
47
41
|
});
|
|
48
|
-
return
|
|
49
|
-
case
|
|
42
|
+
return Item.beginDraggingItem(state, action.layerID, action.itemID, action.x, action.y).updatedState;
|
|
43
|
+
case BEGIN_DRAGGING_ITEM_3D:
|
|
50
44
|
state = state.merge({
|
|
51
|
-
sceneHistory:
|
|
45
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
52
46
|
});
|
|
53
|
-
return
|
|
54
|
-
case
|
|
55
|
-
return
|
|
56
|
-
case
|
|
57
|
-
return
|
|
58
|
-
case
|
|
59
|
-
return
|
|
60
|
-
case
|
|
61
|
-
return
|
|
62
|
-
case
|
|
47
|
+
return Item.beginDraggingItem3D(state, action.layerID, action.itemID, action.x, action.y).updatedState;
|
|
48
|
+
case UPDATE_DRAGGING_ITEM:
|
|
49
|
+
return Item.updateDraggingItem(state, action.x, action.y).updatedState;
|
|
50
|
+
case UPDATE_DRAGGING_ITEM_CHANGED:
|
|
51
|
+
return Item.updateDraggingItemChanged(state, action.x, action.y, action.layerID, action.itemID).updatedState;
|
|
52
|
+
case UPDATE_DRAGGING_ITEM_3DX:
|
|
53
|
+
return Item.updateDraggingItem3DX(state, action.x).updatedState;
|
|
54
|
+
case UPDATE_DRAGGING_ITEM_3DY:
|
|
55
|
+
return Item.updateDraggingItem3DY(state, action.y).updatedState;
|
|
56
|
+
case END_DRAGGING_ITEM:
|
|
63
57
|
state = state.merge({
|
|
64
|
-
sceneHistory:
|
|
58
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
65
59
|
});
|
|
66
|
-
return
|
|
67
|
-
case
|
|
60
|
+
return Item.endDraggingItem(state, action.x, action.y).updatedState;
|
|
61
|
+
case END_DRAGGING_ITEM_3D:
|
|
68
62
|
state = state.merge({
|
|
69
|
-
sceneHistory:
|
|
63
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
70
64
|
});
|
|
71
|
-
return
|
|
72
|
-
case
|
|
65
|
+
return Item.endDraggingItem3D(state).updatedState;
|
|
66
|
+
case BEGIN_ROTATING_ITEM:
|
|
73
67
|
state = state.merge({
|
|
74
|
-
sceneHistory:
|
|
68
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
75
69
|
});
|
|
76
|
-
return
|
|
77
|
-
case
|
|
70
|
+
return Item.beginRotatingItem(state, action.layerID, action.itemID, action.x, action.y).updatedState;
|
|
71
|
+
case BEGIN_ROTATING_ITEM_3D:
|
|
78
72
|
state = state.merge({
|
|
79
|
-
sceneHistory:
|
|
73
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
80
74
|
});
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
return
|
|
86
|
-
case
|
|
75
|
+
return Item.beginRotatingItem3D(state, action.layerID, action.itemID, action.x, action.y, action.centerX, action.centerY).updatedState;
|
|
76
|
+
case UPDATE_ROTATING_ITEM:
|
|
77
|
+
return Item.updateRotatingItem(state, action.x, action.y).updatedState;
|
|
78
|
+
case UPDATE_ROTATING_ITEM_CHANGED:
|
|
79
|
+
return Item.updateRotatingItemChanged(state, action.rotation, action.layerID, action.itemID).updatedState;
|
|
80
|
+
case END_ROTATING_ITEM:
|
|
87
81
|
state = state.merge({
|
|
88
|
-
sceneHistory:
|
|
82
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
89
83
|
});
|
|
90
|
-
return
|
|
91
|
-
case
|
|
84
|
+
return Item.endRotatingItem(state, action.x, action.y).updatedState;
|
|
85
|
+
case END_ROTATING_ITEM_3D:
|
|
92
86
|
state = state.merge({
|
|
93
|
-
sceneHistory:
|
|
87
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
94
88
|
});
|
|
95
|
-
return
|
|
96
|
-
case
|
|
89
|
+
return Item.endRotatingItem3D(state, action.x, action.y).updatedState;
|
|
90
|
+
case REPLACE_SUBMODULE:
|
|
97
91
|
state = state.merge({
|
|
98
|
-
sceneHistory:
|
|
92
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
99
93
|
});
|
|
100
|
-
return
|
|
101
|
-
case
|
|
94
|
+
return Item.replaceSubmodule(state, action.url).updatedState;
|
|
95
|
+
case ANIMATE_OBJECT:
|
|
102
96
|
// state = state.merge({ sceneHistory: history.historyPush(state.sceneHistory, state.scene) });
|
|
103
|
-
return
|
|
104
|
-
case
|
|
105
|
-
return
|
|
106
|
-
case
|
|
107
|
-
return
|
|
108
|
-
case
|
|
109
|
-
return
|
|
110
|
-
case
|
|
111
|
-
return
|
|
112
|
-
case
|
|
113
|
-
return
|
|
114
|
-
case
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
return
|
|
120
|
-
case
|
|
121
|
-
return
|
|
122
|
-
case
|
|
97
|
+
return Item.animateObject(state, action.value).updatedState;
|
|
98
|
+
case REMOVE_REPLACE_SUBMODULE:
|
|
99
|
+
return Item.removeReplacingSupport(state).updatedState;
|
|
100
|
+
case ITEM_MOVE_UP:
|
|
101
|
+
return Item.updateItemsAltitude(state, action.layerID, action.itemID, action.value).updatedState;
|
|
102
|
+
case SELECT_TOOL_DRAWING_ITEM_3D:
|
|
103
|
+
return Item.selectToolDrawingItem3D(state, action.sceneComponentType).updatedState;
|
|
104
|
+
case SET_DOOR_STYLE:
|
|
105
|
+
return Item.setDoorStyle(state, action.doorStyle, action.pathes, action.isAll).updatedState;
|
|
106
|
+
case SET_HANDLE_MATERIAL:
|
|
107
|
+
return Item.setHandleMaterial(state, action.material).updatedState;
|
|
108
|
+
case SET_DOOR_HANDLE:
|
|
109
|
+
return Item.setDoorHandle(state, action.doorHandle).updatedState;
|
|
110
|
+
case SET_COUNTER_TOP:
|
|
111
|
+
return Item.setCounterTop(state, action.counterTop).updatedState;
|
|
112
|
+
case SET_MOLDING:
|
|
113
|
+
return Item.setMolding(state, action.molding, action.isAll).updatedState;
|
|
114
|
+
case UPDATE_MOLDING:
|
|
115
|
+
return Item.updateMolding(state).updatedState;
|
|
116
|
+
case SET_WALL_COLOR:
|
|
123
117
|
state = state.merge({
|
|
124
|
-
sceneHistory:
|
|
118
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
125
119
|
}); // save history when this actino performed,so undo enable
|
|
126
|
-
return
|
|
127
|
-
case
|
|
128
|
-
return
|
|
129
|
-
case
|
|
130
|
-
return
|
|
131
|
-
case
|
|
132
|
-
return
|
|
133
|
-
case
|
|
134
|
-
return
|
|
135
|
-
case
|
|
136
|
-
return
|
|
137
|
-
case
|
|
138
|
-
return
|
|
120
|
+
return Item.setWallColor(state, action.wallColor).updatedState;
|
|
121
|
+
case SET_MODELLING:
|
|
122
|
+
return Item.setModelling(state, action.model).updatedState;
|
|
123
|
+
case SET_BACKSPLASH:
|
|
124
|
+
return Item.setBacksplash(state, action.backsplash).updatedState;
|
|
125
|
+
case SET_BACKSPLASH_VISIBLE:
|
|
126
|
+
return Item.setBacksplashVisible(state, action.itemID, action.backsplashVisible).updatedState;
|
|
127
|
+
case SET_APPLIANCE_MATERIAL:
|
|
128
|
+
return Item.setApplianceMaterial(state, action.material).updatedState;
|
|
129
|
+
case SET_INITIAL_DOOR_STYLE:
|
|
130
|
+
return Item.setInitialDoorStyle(state, action.doorStyle, action.oStyle).updatedState;
|
|
131
|
+
case UPDATE_ITEM_POSITION:
|
|
132
|
+
return Item.updateItemPosition(state, action.layerID, action.itemID, action.pos).updatedState;
|
|
139
133
|
// case SET_MOVE_STATUS:
|
|
140
134
|
// return state.merge({ moveStatus: action.status });
|
|
141
135
|
// case SET_ROTATE_STATUS:
|
|
@@ -1,50 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _export = require("../class/export");
|
|
8
|
-
var _export2 = require("../utils/export");
|
|
9
|
-
var _constants = require("../constants");
|
|
10
|
-
function _default(state, action) {
|
|
1
|
+
import { Line } from "../class/export";
|
|
2
|
+
import { history } from "../utils/export";
|
|
3
|
+
import { BEGIN_DRAGGING_LINE, BEGIN_DRAWING_LINE, END_DRAGGING_LINE, END_DRAWING_LINE, SELECT_LINE, SELECT_TOOL_DRAWING_LINE, SET_RELATED_LINE, STOP_DRAWING_LINE, UPDATE_DRAGGING_LINE, UPDATE_DRAWING_LINE } from "../constants";
|
|
4
|
+
export default function (state, action) {
|
|
11
5
|
switch (action.type) {
|
|
12
|
-
case
|
|
6
|
+
case SELECT_TOOL_DRAWING_LINE:
|
|
13
7
|
sessionStorage.setItem('hintTextShow', true);
|
|
14
8
|
setTimeout(function () {
|
|
15
9
|
sessionStorage.setItem('hintTextShow', false);
|
|
16
10
|
}, 500);
|
|
17
|
-
return
|
|
18
|
-
case
|
|
11
|
+
return Line.selectToolDrawingLine(state, action.sceneComponentType).updatedState;
|
|
12
|
+
case BEGIN_DRAWING_LINE:
|
|
19
13
|
state = state.merge({
|
|
20
|
-
sceneHistory:
|
|
14
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
21
15
|
});
|
|
22
|
-
return
|
|
23
|
-
case
|
|
24
|
-
return
|
|
25
|
-
case
|
|
26
|
-
return
|
|
27
|
-
case
|
|
16
|
+
return Line.beginDrawingLine(state, action.layerID, action.x, action.y).updatedState;
|
|
17
|
+
case UPDATE_DRAWING_LINE:
|
|
18
|
+
return Line.updateDrawingLine(state, action.x, action.y, action.relatedLines).updatedState;
|
|
19
|
+
case STOP_DRAWING_LINE:
|
|
20
|
+
return Line.stopDrawingLine(state).updatedState;
|
|
21
|
+
case END_DRAWING_LINE:
|
|
28
22
|
state = state.merge({
|
|
29
|
-
sceneHistory:
|
|
23
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
30
24
|
});
|
|
31
|
-
return
|
|
32
|
-
case
|
|
25
|
+
return Line.endDrawingLine(state, action.x, action.y).updatedState;
|
|
26
|
+
case BEGIN_DRAGGING_LINE:
|
|
33
27
|
state = state.merge({
|
|
34
|
-
sceneHistory:
|
|
28
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
35
29
|
});
|
|
36
|
-
return
|
|
37
|
-
case
|
|
38
|
-
return
|
|
39
|
-
case
|
|
30
|
+
return Line.beginDraggingLine(state, action.layerID, action.lineID, action.x, action.y).updatedState;
|
|
31
|
+
case UPDATE_DRAGGING_LINE:
|
|
32
|
+
return Line.updateDraggingLine(state, action.x, action.y, action.relatedLines).updatedState;
|
|
33
|
+
case END_DRAGGING_LINE:
|
|
40
34
|
state = state.merge({
|
|
41
|
-
sceneHistory:
|
|
35
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
42
36
|
});
|
|
43
|
-
return
|
|
44
|
-
case
|
|
45
|
-
return
|
|
46
|
-
case
|
|
47
|
-
return
|
|
37
|
+
return Line.endDraggingLine(state, action.x, action.y, action.relatedLines).updatedState;
|
|
38
|
+
case SELECT_LINE:
|
|
39
|
+
return Line.select(state, action.layerID, action.lineID).updatedState;
|
|
40
|
+
case SET_RELATED_LINE:
|
|
41
|
+
return Line.setRelatedLine(state, action.layerID, action.lineID, action.intersection).updatedState;
|
|
48
42
|
default:
|
|
49
43
|
return state;
|
|
50
44
|
}
|