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,134 +1,128 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _export = require("../utils/export");
|
|
8
|
-
var _constants = require("../constants");
|
|
9
|
-
var _export2 = require("../class/export");
|
|
10
|
-
function _default(state, action) {
|
|
1
|
+
import { history } from "../utils/export";
|
|
2
|
+
import { ADD_CIRCULAR_GUIDE, ADD_HORIZONTAL_GUIDE, ADD_VERTICAL_GUIDE, ALTERATE_STATE, CHANGE_CATALOG_PAGE, COPY_PROPERTIES, GO_BACK_TO_CATALOG_PAGE, INIT_CATALOG, LOAD_PROJECT, MODE_DRAWING_LINE, MODE_IDLE, NEW_PROJECT, OPEN_CATALOG, OPEN_PROJECT_CONFIGURATOR, PASTE_PROPERTIES, PROJECT_RE_NAME, PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY, RECREATE, REDO, REMOVE, REMOVE_CIRCULAR_GUIDE, REMOVE_DRAWING_SUPPORT, REMOVE_HORIZONTAL_GUIDE, REMOVE_VERTICAL_GUIDE, ROLLBACK, SELECT_ALL, SELECT_TOOL_EDIT, SET_HOLES_ATTRIBUTES, SET_IS_CABINET_DRAWING, SET_IS_HELP, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_MODE, SET_PROJECT_ID, SET_PROJECT_PROPERTIES, SET_PROPERTIES, SET_STATE_PROPERTIES, SHIFT2DOFF, SHIFT2DON, THROW_ERROR, THROW_WARNING, TOGGLE_SNAP, UNCREATE, UNDO, UNSELECT_ALL, UPDATE_MOUSE_COORDS, UPDATE_ZOOM_SCALE } from "../constants";
|
|
3
|
+
import { Project } from "../class/export";
|
|
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
|
|
6
|
+
case NEW_PROJECT:
|
|
7
|
+
return Project.newProject(state).updatedState;
|
|
8
|
+
case LOAD_PROJECT:
|
|
9
|
+
return Project.loadProject(state, action.sceneJSON, action.categoryData).updatedState;
|
|
10
|
+
case OPEN_CATALOG:
|
|
11
|
+
return Project.openCatalog(state).updatedState;
|
|
12
|
+
case CHANGE_CATALOG_PAGE:
|
|
13
|
+
return Project.changeCatalogPage(state, action.oldPage, action.newPage).updatedState;
|
|
14
|
+
case GO_BACK_TO_CATALOG_PAGE:
|
|
15
|
+
return Project.goBackToCatalogPage(state, action.newPage).updatedState;
|
|
16
|
+
case SELECT_TOOL_EDIT:
|
|
17
|
+
return Project.setMode(state, MODE_IDLE).updatedState;
|
|
18
|
+
case UNSELECT_ALL:
|
|
19
|
+
return Project.unselectAll(state).updatedState;
|
|
20
|
+
case SELECT_ALL:
|
|
21
|
+
return Project.selectAll(state, action.value).updatedState;
|
|
22
|
+
case SET_PROPERTIES:
|
|
29
23
|
state = state.merge({
|
|
30
|
-
sceneHistory:
|
|
24
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
31
25
|
});
|
|
32
|
-
return
|
|
33
|
-
case
|
|
26
|
+
return Project.setProperties(state, state.getIn(['scene', 'selectedLayer']), action.properties).updatedState;
|
|
27
|
+
case SET_ITEMS_ATTRIBUTES:
|
|
34
28
|
state = state.merge({
|
|
35
|
-
sceneHistory:
|
|
29
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
36
30
|
});
|
|
37
|
-
return
|
|
38
|
-
case
|
|
39
|
-
if (state.mode !=
|
|
40
|
-
sceneHistory:
|
|
31
|
+
return Project.setItemsAttributes(state, action.itemsAttributes).updatedState;
|
|
32
|
+
case SET_LINES_ATTRIBUTES:
|
|
33
|
+
if (state.mode != MODE_DRAWING_LINE) state = state.merge({
|
|
34
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
41
35
|
});
|
|
42
|
-
return
|
|
43
|
-
case
|
|
36
|
+
return Project.setLinesAttributes(state, action.linesAttributes, action.isDirect, action.directData).updatedState;
|
|
37
|
+
case SET_HOLES_ATTRIBUTES:
|
|
44
38
|
state = state.merge({
|
|
45
|
-
sceneHistory:
|
|
39
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
46
40
|
});
|
|
47
|
-
return
|
|
48
|
-
case
|
|
41
|
+
return Project.setHolesAttributes(state, action.holesAttributes).updatedState;
|
|
42
|
+
case REMOVE:
|
|
49
43
|
state = state.merge({
|
|
50
|
-
sceneHistory:
|
|
44
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
51
45
|
});
|
|
52
|
-
return
|
|
53
|
-
case
|
|
54
|
-
return
|
|
55
|
-
case
|
|
56
|
-
return
|
|
57
|
-
case
|
|
58
|
-
return
|
|
59
|
-
case
|
|
60
|
-
return
|
|
61
|
-
case
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
return
|
|
67
|
-
case
|
|
68
|
-
return
|
|
69
|
-
case
|
|
46
|
+
return Project.remove(state).updatedState;
|
|
47
|
+
case UNDO:
|
|
48
|
+
return Project.undo(state).updatedState;
|
|
49
|
+
case REDO:
|
|
50
|
+
return Project.redo(state).updatedState;
|
|
51
|
+
case UNCREATE:
|
|
52
|
+
return Project.uncreate(state).updatedState;
|
|
53
|
+
case PROJECT_RE_NAME:
|
|
54
|
+
return Project.rename(state, action.name).updatedState;
|
|
55
|
+
case RECREATE:
|
|
56
|
+
return Project.recreate(state).updatedState;
|
|
57
|
+
case SHIFT2DOFF:
|
|
58
|
+
return Project.shift2doff(state).updatedState;
|
|
59
|
+
case SHIFT2DON:
|
|
60
|
+
return Project.shift2don(state).updatedState;
|
|
61
|
+
case ROLLBACK:
|
|
62
|
+
return Project.rollback(state).updatedState;
|
|
63
|
+
case SET_PROJECT_PROPERTIES:
|
|
70
64
|
state = state.merge({
|
|
71
|
-
sceneHistory:
|
|
65
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
72
66
|
});
|
|
73
|
-
return
|
|
74
|
-
case
|
|
67
|
+
return Project.setProjectProperties(state, action.properties).updatedState;
|
|
68
|
+
case SET_PROJECT_ID:
|
|
75
69
|
state = state.merge({
|
|
76
|
-
sceneHistory:
|
|
70
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
77
71
|
});
|
|
78
|
-
return
|
|
79
|
-
case
|
|
72
|
+
return Project.setProjectId(state, action.id).updatedState;
|
|
73
|
+
case OPEN_PROJECT_CONFIGURATOR:
|
|
80
74
|
state = state.merge({
|
|
81
|
-
sceneHistory:
|
|
75
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
82
76
|
});
|
|
83
|
-
return
|
|
84
|
-
case
|
|
85
|
-
return
|
|
86
|
-
case
|
|
87
|
-
return
|
|
88
|
-
case
|
|
89
|
-
return
|
|
90
|
-
case
|
|
91
|
-
return
|
|
92
|
-
case
|
|
93
|
-
return
|
|
94
|
-
case
|
|
95
|
-
return
|
|
96
|
-
case
|
|
97
|
-
return
|
|
98
|
-
case
|
|
77
|
+
return Project.openProjectConfigurator(state).updatedState;
|
|
78
|
+
case INIT_CATALOG:
|
|
79
|
+
return Project.initCatalog(state, action.catalog).updatedState;
|
|
80
|
+
case UPDATE_MOUSE_COORDS:
|
|
81
|
+
return Project.updateMouseCoord(state, action.coords).updatedState;
|
|
82
|
+
case UPDATE_ZOOM_SCALE:
|
|
83
|
+
return Project.updateZoomScale(state, action.scale).updatedState;
|
|
84
|
+
case TOGGLE_SNAP:
|
|
85
|
+
return Project.toggleSnap(state, action.mask).updatedState;
|
|
86
|
+
case THROW_ERROR:
|
|
87
|
+
return Project.throwError(state, action.error).updatedState;
|
|
88
|
+
case THROW_WARNING:
|
|
89
|
+
return Project.throwWarning(state, action.warning).updatedState;
|
|
90
|
+
case COPY_PROPERTIES:
|
|
91
|
+
return Project.copyProperties(state, action.properties).updatedState;
|
|
92
|
+
case PASTE_PROPERTIES:
|
|
99
93
|
state = state.merge({
|
|
100
|
-
sceneHistory:
|
|
94
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
101
95
|
});
|
|
102
|
-
return
|
|
103
|
-
case
|
|
104
|
-
return
|
|
105
|
-
case
|
|
106
|
-
return
|
|
107
|
-
case
|
|
108
|
-
return
|
|
109
|
-
case
|
|
96
|
+
return Project.pasteProperties(state).updatedState;
|
|
97
|
+
case PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY:
|
|
98
|
+
return Project.pushLastSelectedCatalogElementToHistory(state, action.element).updatedState;
|
|
99
|
+
case ALTERATE_STATE:
|
|
100
|
+
return Project.setAlterate(state).updatedState;
|
|
101
|
+
case SET_MODE:
|
|
102
|
+
return Project.setMode(state, action.mode).updatedState;
|
|
103
|
+
case ADD_HORIZONTAL_GUIDE:
|
|
110
104
|
state = state.merge({
|
|
111
|
-
sceneHistory:
|
|
105
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
112
106
|
});
|
|
113
|
-
return
|
|
114
|
-
case
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
119
|
-
return
|
|
120
|
-
case
|
|
121
|
-
return
|
|
122
|
-
case
|
|
123
|
-
return
|
|
124
|
-
case
|
|
125
|
-
return
|
|
126
|
-
case
|
|
127
|
-
return
|
|
128
|
-
case
|
|
129
|
-
return
|
|
130
|
-
case
|
|
131
|
-
return
|
|
107
|
+
return Project.addHorizontalGuide(state, action.coordinate).updatedState;
|
|
108
|
+
case ADD_VERTICAL_GUIDE:
|
|
109
|
+
return Project.addVerticalGuide(state, action.coordinate).updatedState;
|
|
110
|
+
case ADD_CIRCULAR_GUIDE:
|
|
111
|
+
return Project.addCircularGuide(state, action.x, action.y, action.radius).updatedState;
|
|
112
|
+
case REMOVE_HORIZONTAL_GUIDE:
|
|
113
|
+
return Project.removeHorizontalGuide(state, action.guideID).updatedState;
|
|
114
|
+
case REMOVE_VERTICAL_GUIDE:
|
|
115
|
+
return Project.removeVerticalGuide(state, action.guideID).updatedState;
|
|
116
|
+
case REMOVE_CIRCULAR_GUIDE:
|
|
117
|
+
return Project.removeCircularGuide(state, action.guideID).updatedState;
|
|
118
|
+
case REMOVE_DRAWING_SUPPORT:
|
|
119
|
+
return Project.removeDrawingSupport(state).updatedState;
|
|
120
|
+
case SET_STATE_PROPERTIES:
|
|
121
|
+
return Project.setStateProperties(state, action.properties).updatedState;
|
|
122
|
+
case SET_IS_HELP:
|
|
123
|
+
return Project.setIsHelp(state, action.isHelp).updatedState;
|
|
124
|
+
case SET_IS_CABINET_DRAWING:
|
|
125
|
+
return Project.setIsCabinetDrawing(state, action.isCabinetDrawing).updatedState;
|
|
132
126
|
default:
|
|
133
127
|
return state;
|
|
134
128
|
}
|
package/es/reducers/reducer.js
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports["default"] = appReducer;
|
|
7
|
-
exports.initialState = void 0;
|
|
8
|
-
var _constants = require("../constants");
|
|
9
|
-
var _export = require("./export");
|
|
10
|
-
var _models = require("../models");
|
|
11
|
-
var initialState = exports.initialState = new _models.State();
|
|
12
|
-
function appReducer(state, action) {
|
|
1
|
+
import { AREA_ACTIONS, GROUP_ACTIONS, HOLE_ACTIONS, ITEMS_ACTIONS, LINE_ACTIONS, PROJECT_ACTIONS, SCENE_ACTIONS, USER_ACTIONS, VERTEX_ACTIONS, VIEWER2D_ACTIONS, VIEWER3D_ACTIONS } from "../constants";
|
|
2
|
+
import { KitchenConfiguratorAreasReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorUserReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer } from "./export";
|
|
3
|
+
import { State } from "../models";
|
|
4
|
+
export var initialState = new State();
|
|
5
|
+
export default function appReducer(state, action) {
|
|
13
6
|
// /////////
|
|
14
|
-
if (
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
if (
|
|
18
|
-
if (
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
-
if (
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
24
|
-
if (
|
|
7
|
+
if (PROJECT_ACTIONS[action.type]) return KitchenConfiguratorProjectReducer.apply(void 0, arguments);
|
|
8
|
+
if (VIEWER2D_ACTIONS[action.type]) return KitchenConfiguratorViewer2dReducer.apply(void 0, arguments);
|
|
9
|
+
if (VIEWER3D_ACTIONS[action.type]) return KitchenConfiguratorViewer3dReducer.apply(void 0, arguments);
|
|
10
|
+
if (ITEMS_ACTIONS[action.type]) return KitchenConfiguratorItemsReducer.apply(void 0, arguments);
|
|
11
|
+
if (HOLE_ACTIONS[action.type]) return KitchenConfiguratorHolesReducer.apply(void 0, arguments);
|
|
12
|
+
if (LINE_ACTIONS[action.type]) return KitchenConfiguratorLinesReducer.apply(void 0, arguments);
|
|
13
|
+
if (AREA_ACTIONS[action.type]) return KitchenConfiguratorAreasReducer.apply(void 0, arguments);
|
|
14
|
+
if (GROUP_ACTIONS[action.type]) return KitchenConfiguratorGroupsReducer.apply(void 0, arguments);
|
|
15
|
+
if (SCENE_ACTIONS[action.type]) return KitchenConfiguratorSceneReducer.apply(void 0, arguments);
|
|
16
|
+
if (VERTEX_ACTIONS[action.type]) return KitchenConfiguratorVerticesReducer.apply(void 0, arguments);
|
|
17
|
+
if (USER_ACTIONS[action.type]) return KitchenConfiguratorUserReducer.apply(void 0, arguments);
|
|
25
18
|
return state || initialState;
|
|
26
19
|
}
|
|
@@ -1,33 +1,27 @@
|
|
|
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 { Layer } from "../class/export";
|
|
2
|
+
import { history } from "../utils/export";
|
|
3
|
+
import { ADD_LAYER, REMOVE_LAYER, SELECT_LAYER, SET_LAYER_PROPERTIES, UPDATE_MOVING_STATE } from "../constants";
|
|
4
|
+
export default function (state, action) {
|
|
11
5
|
var saveHistory = function saveHistory() {
|
|
12
6
|
return state = state.merge({
|
|
13
|
-
sceneHistory:
|
|
7
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
14
8
|
});
|
|
15
9
|
};
|
|
16
10
|
switch (action.type) {
|
|
17
|
-
case
|
|
11
|
+
case ADD_LAYER:
|
|
18
12
|
saveHistory();
|
|
19
|
-
return
|
|
20
|
-
case
|
|
13
|
+
return Layer.create(state, action.name, action.altitude).updatedState;
|
|
14
|
+
case SELECT_LAYER:
|
|
21
15
|
saveHistory();
|
|
22
|
-
return
|
|
23
|
-
case
|
|
16
|
+
return Layer.select(state, action.layerID).updatedState;
|
|
17
|
+
case SET_LAYER_PROPERTIES:
|
|
24
18
|
saveHistory();
|
|
25
|
-
return
|
|
26
|
-
case
|
|
19
|
+
return Layer.setProperties(state, action.layerID, action.properties).updatedState;
|
|
20
|
+
case REMOVE_LAYER:
|
|
27
21
|
saveHistory();
|
|
28
|
-
return
|
|
29
|
-
case
|
|
30
|
-
return
|
|
22
|
+
return Layer.remove(state, action.layerID).updatedState;
|
|
23
|
+
case UPDATE_MOVING_STATE:
|
|
24
|
+
return Layer.updateMovingState(state, action.showflag).updatedState;
|
|
31
25
|
default:
|
|
32
26
|
return state;
|
|
33
27
|
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _constants = require("../constants");
|
|
1
|
+
import { LOGIN_ERROR, LOGIN_SUCCESS, LOGOUT } from "../constants";
|
|
8
2
|
var initialState = {
|
|
9
3
|
success: false,
|
|
10
4
|
error: {
|
|
@@ -12,23 +6,23 @@ var initialState = {
|
|
|
12
6
|
password: null
|
|
13
7
|
}
|
|
14
8
|
};
|
|
15
|
-
function
|
|
9
|
+
export default function (state, action) {
|
|
16
10
|
switch (action.type) {
|
|
17
|
-
case
|
|
11
|
+
case LOGIN_SUCCESS:
|
|
18
12
|
{
|
|
19
13
|
return state.merge({
|
|
20
14
|
login: true,
|
|
21
15
|
userId: action.userid
|
|
22
16
|
});
|
|
23
17
|
}
|
|
24
|
-
case
|
|
18
|
+
case LOGIN_ERROR:
|
|
25
19
|
{
|
|
26
20
|
return state.merge({
|
|
27
21
|
login: false,
|
|
28
22
|
userId: 0
|
|
29
23
|
});
|
|
30
24
|
}
|
|
31
|
-
case
|
|
25
|
+
case LOGOUT:
|
|
32
26
|
{
|
|
33
27
|
state = state.merge({
|
|
34
28
|
scene: state.scene.merge({
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _constants = require("../constants");
|
|
8
|
-
var _export = require("../utils/export");
|
|
9
|
-
var _export2 = require("../class/export");
|
|
10
|
-
function _default(state, action) {
|
|
1
|
+
import { BEGIN_DRAGGING_VERTEX, END_DRAGGING_VERTEX, UPDATE_DRAGGING_VERTEX } from "../constants";
|
|
2
|
+
import { history } from "../utils/export";
|
|
3
|
+
import { Vertex } from "../class/export";
|
|
4
|
+
export default function (state, action) {
|
|
11
5
|
switch (action.type) {
|
|
12
|
-
case
|
|
13
|
-
return
|
|
14
|
-
case
|
|
15
|
-
return
|
|
16
|
-
case
|
|
6
|
+
case BEGIN_DRAGGING_VERTEX:
|
|
7
|
+
return Vertex.beginDraggingVertex(state, action.layerID, action.vertexID, action.x, action.y).updatedState;
|
|
8
|
+
case UPDATE_DRAGGING_VERTEX:
|
|
9
|
+
return Vertex.updateDraggingVertex(state, action.x, action.y).updatedState;
|
|
10
|
+
case END_DRAGGING_VERTEX:
|
|
17
11
|
// Code that saving the scene history (26 ~ 28)
|
|
18
12
|
state = state.merge({
|
|
19
|
-
sceneHistory:
|
|
13
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
20
14
|
});
|
|
21
|
-
return
|
|
15
|
+
return Vertex.endDraggingVertex(state, action.x, action.y).updatedState;
|
|
22
16
|
default:
|
|
23
17
|
return state;
|
|
24
18
|
}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _constants = require("../constants");
|
|
8
|
-
var _convertUnitsLite = require("../utils/convert-units-lite");
|
|
9
|
-
function _default(state, action) {
|
|
1
|
+
import { CHANGE_BASE_CABINET_MEASURE, CHANGE_WALL_CABINET_MEASURE, CHANGE_WALL_LENGTH_MEASURE, CHANGE_WINDOW_DOOR_MEASURE, MODE_2D_PAN, MODE_2D_ZOOM_IN, MODE_2D_ZOOM_OUT, SELECT_TOOL_PAN, SELECT_TOOL_ZOOM_IN, SELECT_TOOL_ZOOM_OUT, UPDATE_2D_CAMERA, UPDATE_CEIL_HEIGHT, UPDATE_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
|
+
import { convert } from "../utils/convert-units-lite";
|
|
3
|
+
export default function (state, action) {
|
|
10
4
|
var _state = state,
|
|
11
5
|
scene = _state.scene;
|
|
12
6
|
switch (action.type) {
|
|
13
|
-
case
|
|
7
|
+
case UPDATE_CEIL_HEIGHT_UNIT:
|
|
14
8
|
{
|
|
15
9
|
var _state2 = state,
|
|
16
10
|
_scene = _state2.scene;
|
|
@@ -22,7 +16,7 @@ function _default(state, action) {
|
|
|
22
16
|
state = state.mergeIn(['scene', 'layers', selectedLayer], newLayer);
|
|
23
17
|
return state;
|
|
24
18
|
}
|
|
25
|
-
case
|
|
19
|
+
case UPDATE_CEIL_HEIGHT:
|
|
26
20
|
{
|
|
27
21
|
var _selectedLayer = scene.selectedLayer;
|
|
28
22
|
var _layer = scene.layers.get(_selectedLayer);
|
|
@@ -35,47 +29,47 @@ function _default(state, action) {
|
|
|
35
29
|
if (item.type.includes('Light')) {
|
|
36
30
|
var height = item.properties.getIn(['height', '_length']);
|
|
37
31
|
var heightUnit = item.properties.getIn(['height', '_unit']);
|
|
38
|
-
var newAltitude = action.value -
|
|
39
|
-
item = item.setIn(['properties', 'altitude', '_length'],
|
|
32
|
+
var newAltitude = action.value - convert(height).from(heightUnit).to('in');
|
|
33
|
+
item = item.setIn(['properties', 'altitude', '_length'], convert(newAltitude).from('in').to(_layer.unit));
|
|
40
34
|
}
|
|
41
35
|
return item;
|
|
42
36
|
});
|
|
43
37
|
state = state.mergeIn(['scene', 'layers', _selectedLayer, 'items'], newItems);
|
|
44
38
|
return state;
|
|
45
39
|
}
|
|
46
|
-
case
|
|
40
|
+
case UPDATE_2D_CAMERA:
|
|
47
41
|
return state.merge({
|
|
48
42
|
viewer2D: action.value
|
|
49
43
|
});
|
|
50
|
-
case
|
|
44
|
+
case CHANGE_WALL_LENGTH_MEASURE:
|
|
51
45
|
return state.merge({
|
|
52
46
|
scene: scene.merge({
|
|
53
47
|
showWallLengthMeasure: action.value
|
|
54
48
|
})
|
|
55
49
|
});
|
|
56
|
-
case
|
|
50
|
+
case CHANGE_BASE_CABINET_MEASURE:
|
|
57
51
|
return state.merge({
|
|
58
52
|
scene: scene.merge({
|
|
59
53
|
showBaseCabinetMeasure: action.value
|
|
60
54
|
})
|
|
61
55
|
});
|
|
62
|
-
case
|
|
56
|
+
case CHANGE_WALL_CABINET_MEASURE:
|
|
63
57
|
return state.merge({
|
|
64
58
|
scene: scene.merge({
|
|
65
59
|
showWallCabinetMeasure: action.value
|
|
66
60
|
})
|
|
67
61
|
});
|
|
68
|
-
case
|
|
62
|
+
case CHANGE_WINDOW_DOOR_MEASURE:
|
|
69
63
|
return state.merge({
|
|
70
64
|
scene: scene.merge({
|
|
71
65
|
showWindowDoorMeasure: action.value
|
|
72
66
|
})
|
|
73
67
|
});
|
|
74
|
-
case
|
|
75
|
-
return state.set('mode',
|
|
76
|
-
case
|
|
77
|
-
return state.set('mode',
|
|
78
|
-
case
|
|
79
|
-
return state.set('mode',
|
|
68
|
+
case SELECT_TOOL_PAN:
|
|
69
|
+
return state.set('mode', MODE_2D_PAN);
|
|
70
|
+
case SELECT_TOOL_ZOOM_IN:
|
|
71
|
+
return state.set('mode', MODE_2D_ZOOM_IN);
|
|
72
|
+
case SELECT_TOOL_ZOOM_OUT:
|
|
73
|
+
return state.set('mode', MODE_2D_ZOOM_OUT);
|
|
80
74
|
}
|
|
81
75
|
}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports["default"] = _default;
|
|
7
|
-
var _constants = require("../constants");
|
|
8
|
-
var _export = require("../class/export");
|
|
9
|
-
var _export2 = require("../utils/export");
|
|
10
|
-
var _convertUnitsLite = require("../utils/convert-units-lite");
|
|
11
|
-
function _default(state, action) {
|
|
1
|
+
import { MODE_3D_FIRST_PERSON, MODE_3D_VIEW, SELECT_TOOL_3D_FIRST_PERSON, SELECT_TOOL_3D_VIEW, UPDATE_3D_CEIL_HEIGHT, UPDATE_3D_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
|
+
import { Project } from "../class/export";
|
|
3
|
+
import { history } from "../utils/export";
|
|
4
|
+
import { convert } from "../utils/convert-units-lite";
|
|
5
|
+
export default function (state, action) {
|
|
12
6
|
state = state.merge({
|
|
13
|
-
sceneHistory:
|
|
7
|
+
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
14
8
|
});
|
|
15
9
|
switch (action.type) {
|
|
16
|
-
case
|
|
10
|
+
case UPDATE_3D_CEIL_HEIGHT_UNIT:
|
|
17
11
|
{
|
|
18
12
|
var _state = state,
|
|
19
13
|
scene = _state.scene;
|
|
@@ -25,7 +19,7 @@ function _default(state, action) {
|
|
|
25
19
|
state = state.mergeIn(['scene', 'layers', selectedLayer], newLayer);
|
|
26
20
|
return state;
|
|
27
21
|
}
|
|
28
|
-
case
|
|
22
|
+
case UPDATE_3D_CEIL_HEIGHT:
|
|
29
23
|
{
|
|
30
24
|
var _state2 = state,
|
|
31
25
|
_scene = _state2.scene;
|
|
@@ -40,21 +34,21 @@ function _default(state, action) {
|
|
|
40
34
|
if (item.type.includes('Light')) {
|
|
41
35
|
var height = item.properties.getIn(['height', '_length']);
|
|
42
36
|
var heightUnit = item.properties.getIn(['height', '_unit']);
|
|
43
|
-
var newAltitude = action.value -
|
|
44
|
-
item = item.setIn(['properties', 'altitude', '_length'],
|
|
37
|
+
var newAltitude = action.value - convert(height).from(heightUnit).to('in');
|
|
38
|
+
item = item.setIn(['properties', 'altitude', '_length'], convert(newAltitude).from('in').to(_layer.unit));
|
|
45
39
|
}
|
|
46
40
|
return item;
|
|
47
41
|
});
|
|
48
42
|
state = state.mergeIn(['scene', 'layers', _selectedLayer, 'items'], newItems);
|
|
49
43
|
return state;
|
|
50
44
|
}
|
|
51
|
-
case
|
|
52
|
-
state =
|
|
53
|
-
state =
|
|
45
|
+
case SELECT_TOOL_3D_VIEW:
|
|
46
|
+
state = Project.rollback(state).updatedState;
|
|
47
|
+
state = Project.setMode(state, MODE_3D_VIEW).updatedState;
|
|
54
48
|
return state;
|
|
55
|
-
case
|
|
56
|
-
state =
|
|
57
|
-
state =
|
|
49
|
+
case SELECT_TOOL_3D_FIRST_PERSON:
|
|
50
|
+
state = Project.rollback(state).updatedState;
|
|
51
|
+
state = Project.setMode(state, MODE_3D_FIRST_PERSON).updatedState;
|
|
58
52
|
return state;
|
|
59
53
|
default:
|
|
60
54
|
return state;
|
package/es/shared-style.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.TOOLBAR_COLOR = exports.SECONDARY_COLOR = exports.PRIMARY_COLOR = exports.MESH_SELECTED = exports.MATERIAL_COLORS = exports.LINE_MESH_COLOR = exports.LINE_MESH = exports.INTERIOR_LINE = exports.COLORS = exports.AREA_MESH_COLOR = void 0;
|
|
7
1
|
// COLORS
|
|
8
|
-
var COLORS =
|
|
2
|
+
export var COLORS = {
|
|
9
3
|
white: '#FFF',
|
|
10
4
|
lightgrey: '#d3d3d3',
|
|
11
5
|
black: '#000'
|
|
12
6
|
};
|
|
13
|
-
var MATERIAL_COLORS =
|
|
7
|
+
export var MATERIAL_COLORS = {
|
|
14
8
|
500: {
|
|
15
9
|
amber: '#FFC107',
|
|
16
10
|
blue_grey: '#607D8B',
|
|
@@ -33,7 +27,7 @@ var MATERIAL_COLORS = exports.MATERIAL_COLORS = {
|
|
|
33
27
|
yellow: '#FFEB3B'
|
|
34
28
|
}
|
|
35
29
|
};
|
|
36
|
-
var PRIMARY_COLOR =
|
|
30
|
+
export var PRIMARY_COLOR = {
|
|
37
31
|
main: '#DEDEDE',
|
|
38
32
|
alt: '#DEDEDE',
|
|
39
33
|
icon: '#A2A2A2',
|
|
@@ -42,31 +36,31 @@ var PRIMARY_COLOR = exports.PRIMARY_COLOR = {
|
|
|
42
36
|
text_alt: '#232323',
|
|
43
37
|
input: '#55595C'
|
|
44
38
|
};
|
|
45
|
-
var SECONDARY_COLOR =
|
|
39
|
+
export var SECONDARY_COLOR = {
|
|
46
40
|
main: '#1CA6FC',
|
|
47
41
|
alt: '#005FAF',
|
|
48
42
|
icon: '#1CA6FC',
|
|
49
43
|
border: '1px solid #FFF'
|
|
50
44
|
};
|
|
51
|
-
var TOOLBAR_COLOR =
|
|
45
|
+
export var TOOLBAR_COLOR = {
|
|
52
46
|
normal: 'rgb(211,230,228)',
|
|
53
47
|
focus: 'rgba(71, 71, 71,0.9)',
|
|
54
48
|
active: 'rgba(17, 131, 187, 0.8)'
|
|
55
49
|
// active: 'rgba(34,144,107, 0.8)',
|
|
56
50
|
};
|
|
57
|
-
var MESH_SELECTED =
|
|
58
|
-
var AREA_MESH_COLOR =
|
|
51
|
+
export var MESH_SELECTED = 'rgba(71, 71, 71,0.9)';
|
|
52
|
+
export var AREA_MESH_COLOR = {
|
|
59
53
|
selected: 'rgb(234,234,255)',
|
|
60
54
|
unselected: 'rgb(221,221,255)'
|
|
61
55
|
};
|
|
62
|
-
var INTERIOR_LINE =
|
|
56
|
+
export var INTERIOR_LINE = {
|
|
63
57
|
unselected: ' #0a0a10',
|
|
64
58
|
selected: '#4C12A1'
|
|
65
59
|
};
|
|
66
|
-
var LINE_MESH_COLOR =
|
|
60
|
+
export var LINE_MESH_COLOR = {
|
|
67
61
|
selected: '#4C12A1',
|
|
68
62
|
unselected: 'rgb(135,145,171)'
|
|
69
63
|
};
|
|
70
|
-
var LINE_MESH =
|
|
64
|
+
export var LINE_MESH = {
|
|
71
65
|
selected: '#4C12A1'
|
|
72
66
|
};
|