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