kitchen-simulator 1.1.1-test.61 → 1.1.1-test.63

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.
Files changed (189) hide show
  1. package/es/@history.js +2 -10
  2. package/es/AppContext.js +3 -10
  3. package/es/KitchenConfigurator.js +70 -79
  4. package/es/KitchenConfiguratorApp.js +98 -107
  5. package/es/actions/area-actions.js +5 -12
  6. package/es/actions/export.js +12 -29
  7. package/es/actions/groups-actions.js +27 -45
  8. package/es/actions/holes-actions.js +34 -55
  9. package/es/actions/items-actions.js +94 -145
  10. package/es/actions/lines-actions.js +21 -36
  11. package/es/actions/project-actions.js +94 -145
  12. package/es/actions/scene-actions.js +11 -21
  13. package/es/actions/vertices-actions.js +7 -15
  14. package/es/actions/viewer2d-actions.js +21 -36
  15. package/es/actions/viewer3d-actions.js +9 -18
  16. package/es/catalog/areas/area/planner-element.js +2 -9
  17. package/es/catalog/catalog.js +15 -21
  18. package/es/catalog/factories/area-factory-3d.js +22 -31
  19. package/es/catalog/factories/area-factory.js +11 -20
  20. package/es/catalog/factories/export.js +6 -24
  21. package/es/catalog/factories/wall-factory-3d.js +31 -41
  22. package/es/catalog/factories/wall-factory.js +21 -31
  23. package/es/catalog/holes/door-closet/planner-element.js +15 -24
  24. package/es/catalog/holes/door-double/planner-element.js +15 -24
  25. package/es/catalog/holes/door-exterior/planner-element.js +16 -25
  26. package/es/catalog/holes/door-interior/planner-element.js +16 -25
  27. package/es/catalog/holes/door-panic/planner-element.js +7 -16
  28. package/es/catalog/holes/door-panic-double/planner-element.js +15 -24
  29. package/es/catalog/holes/door-sliding/planner-element.js +16 -25
  30. package/es/catalog/holes/doorway-framed/planner-element.js +11 -20
  31. package/es/catalog/holes/doorway-frameless/planner-element.js +7 -16
  32. package/es/catalog/holes/export.js +13 -97
  33. package/es/catalog/holes/window-clear/planner-element.js +10 -19
  34. package/es/catalog/holes/window-cross/planner-element.js +10 -19
  35. package/es/catalog/holes/window-double-hung/planner-element.js +10 -19
  36. package/es/catalog/holes/window-vertical/planner-element.js +10 -19
  37. package/es/catalog/lines/wall/planner-element.js +2 -9
  38. package/es/catalog/molding/molding-dcm/planner-element.js +5 -14
  39. package/es/catalog/molding/molding-fbm/planner-element.js +5 -14
  40. package/es/catalog/molding/molding-lrm/planner-element.js +5 -14
  41. package/es/catalog/properties/export.js +20 -80
  42. package/es/catalog/properties/property-checkbox.js +24 -31
  43. package/es/catalog/properties/property-color.js +16 -23
  44. package/es/catalog/properties/property-enum.js +24 -31
  45. package/es/catalog/properties/property-hidden.js +9 -16
  46. package/es/catalog/properties/property-lenght-measure.js +38 -45
  47. package/es/catalog/properties/property-length-measure.js +36 -43
  48. package/es/catalog/properties/property-length-measure_hole.js +38 -45
  49. package/es/catalog/properties/property-number.js +17 -24
  50. package/es/catalog/properties/property-read-only.js +16 -23
  51. package/es/catalog/properties/property-string.js +16 -23
  52. package/es/catalog/properties/property-toggle.js +16 -23
  53. package/es/catalog/properties/shared-property-style.js +1 -7
  54. package/es/catalog/utils/FuseUtils.js +8 -15
  55. package/es/catalog/utils/exporter.js +8 -15
  56. package/es/catalog/utils/geom-utils.js +13 -29
  57. package/es/catalog/utils/item-loader.js +84 -97
  58. package/es/catalog/utils/load-obj.js +20 -28
  59. package/es/catalog/utils/mtl-loader.js +3 -8
  60. package/es/catalog/utils/obj-loader.js +3 -8
  61. package/es/class/FuseUtils.js +8 -15
  62. package/es/class/area.js +22 -28
  63. package/es/class/export.js +23 -95
  64. package/es/class/group.js +53 -59
  65. package/es/class/guide.js +15 -21
  66. package/es/class/hole.js +83 -89
  67. package/es/class/item.js +141 -147
  68. package/es/class/layer.js +59 -65
  69. package/es/class/line.js +135 -143
  70. package/es/class/project.js +90 -98
  71. package/es/class/vertex.js +29 -35
  72. package/es/components/content.js +19 -28
  73. package/es/components/disclaimer/disclaimer.js +10 -18
  74. package/es/components/export.js +8 -32
  75. package/es/components/style/button.js +23 -31
  76. package/es/components/style/cancel-button.js +7 -14
  77. package/es/components/style/content-container.js +9 -16
  78. package/es/components/style/content-title.js +11 -20
  79. package/es/components/style/delete-button.js +8 -17
  80. package/es/components/style/export.js +30 -120
  81. package/es/components/style/form-block.js +8 -15
  82. package/es/components/style/form-color-input.js +7 -14
  83. package/es/components/style/form-label.js +8 -15
  84. package/es/components/style/form-number-input.js +41 -49
  85. package/es/components/style/form-number-input_2.js +36 -44
  86. package/es/components/style/form-select.js +17 -24
  87. package/es/components/style/form-slider.js +10 -17
  88. package/es/components/style/form-submit-button.js +8 -17
  89. package/es/components/style/form-text-input.js +26 -34
  90. package/es/components/viewer2d/area.js +17 -24
  91. package/es/components/viewer2d/export.js +30 -120
  92. package/es/components/viewer2d/grids/grid-horizontal-streak.js +10 -17
  93. package/es/components/viewer2d/grids/grid-streak.js +10 -17
  94. package/es/components/viewer2d/grids/grid-vertical-streak.js +10 -17
  95. package/es/components/viewer2d/grids/grids.js +10 -19
  96. package/es/components/viewer2d/group.js +15 -24
  97. package/es/components/viewer2d/item.js +61 -70
  98. package/es/components/viewer2d/layer.js +23 -30
  99. package/es/components/viewer2d/line.js +101 -111
  100. package/es/components/viewer2d/ruler.js +22 -29
  101. package/es/components/viewer2d/rulerDist.js +21 -28
  102. package/es/components/viewer2d/rulerX.js +39 -47
  103. package/es/components/viewer2d/rulerY.js +37 -45
  104. package/es/components/viewer2d/scene.js +30 -38
  105. package/es/components/viewer2d/snap.js +13 -22
  106. package/es/components/viewer2d/state.js +18 -27
  107. package/es/components/viewer2d/utils.js +24 -37
  108. package/es/components/viewer2d/vertex.js +8 -17
  109. package/es/components/viewer2d/viewer2d.js +153 -163
  110. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +17 -23
  111. package/es/components/viewer3d/dcm.js +1 -7
  112. package/es/components/viewer3d/fbm.js +1 -7
  113. package/es/components/viewer3d/front3D.js +12 -21
  114. package/es/components/viewer3d/grid-creator.js +8 -17
  115. package/es/components/viewer3d/grids/grid-horizontal-streak.js +6 -14
  116. package/es/components/viewer3d/grids/grid-streak.js +5 -13
  117. package/es/components/viewer3d/grids/grid-vertical-streak.js +6 -14
  118. package/es/components/viewer3d/libs/first-person-controls.js +2 -9
  119. package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1 -7
  120. package/es/components/viewer3d/libs/mtl-loader.js +1 -7
  121. package/es/components/viewer3d/libs/obj-loader.js +1 -7
  122. package/es/components/viewer3d/libs/orbit-controls.js +2 -8
  123. package/es/components/viewer3d/libs/pointer-lock-controls.js +2 -8
  124. package/es/components/viewer3d/lrm.js +1 -7
  125. package/es/components/viewer3d/model.js +1 -7
  126. package/es/components/viewer3d/pointer-lock-navigation.js +3 -10
  127. package/es/components/viewer3d/ruler-utils/itemRect.js +18 -25
  128. package/es/components/viewer3d/ruler-utils/layer3D.js +59 -66
  129. package/es/components/viewer3d/ruler-utils/ruler3D.js +39 -46
  130. package/es/components/viewer3d/ruler-utils/scene3D.js +9 -17
  131. package/es/components/viewer3d/ruler-utils/state3D.js +4 -11
  132. package/es/components/viewer3d/scene-creator.js +191 -226
  133. package/es/components/viewer3d/three-memory-cleaner.js +3 -12
  134. package/es/components/viewer3d/viewer3d-first-person.js +40 -46
  135. package/es/components/viewer3d/viewer3d.js +196 -202
  136. package/es/constants.js +349 -358
  137. package/es/index.js +8 -22
  138. package/es/models.js +177 -184
  139. package/es/plugins/SVGLoader.js +48 -53
  140. package/es/plugins/autosave.js +3 -9
  141. package/es/plugins/console-debugger.js +5 -12
  142. package/es/plugins/export.js +8 -32
  143. package/es/plugins/keyboard.js +29 -35
  144. package/es/reducers/areas-reducer.js +7 -13
  145. package/es/reducers/export.js +24 -96
  146. package/es/reducers/groups-reducer.js +31 -37
  147. package/es/reducers/holes-reducer.js +43 -49
  148. package/es/reducers/items-reducer.js +106 -112
  149. package/es/reducers/lines-reducer.js +28 -34
  150. package/es/reducers/project-reducer.js +105 -111
  151. package/es/reducers/reducer.js +16 -23
  152. package/es/reducers/scene-reducer.js +15 -21
  153. package/es/reducers/user-reducer.js +5 -11
  154. package/es/reducers/vertices-reducer.js +11 -17
  155. package/es/reducers/viewer2d-reducer.js +18 -24
  156. package/es/reducers/viewer3d-reducer.js +16 -22
  157. package/es/shared-style.js +10 -16
  158. package/es/styles/export.js +3 -11
  159. package/es/translator/en.js +1 -7
  160. package/es/translator/it.js +1 -7
  161. package/es/translator/ru.js +1 -7
  162. package/es/translator/translator.js +13 -19
  163. package/es/utils/browser.js +2 -9
  164. package/es/utils/convert-units-lite.js +1 -7
  165. package/es/utils/email-validator.js +1 -7
  166. package/es/utils/export.js +15 -46
  167. package/es/utils/geometry.js +181 -278
  168. package/es/utils/get-edges-of-subgraphs.js +2 -9
  169. package/es/utils/graph-cycles.js +8 -11
  170. package/es/utils/graph-inner-cycles.js +10 -18
  171. package/es/utils/graph.js +9 -17
  172. package/es/utils/helper.js +39 -63
  173. package/es/utils/history.js +8 -15
  174. package/es/utils/id-broker.js +8 -15
  175. package/es/utils/logger.js +1 -7
  176. package/es/utils/math.js +5 -12
  177. package/es/utils/molding.js +119 -144
  178. package/es/utils/name-generator.js +7 -13
  179. package/es/utils/objects-utils.js +7 -19
  180. package/es/utils/phone-validator.js +1 -7
  181. package/es/utils/process-black-list.js +3 -10
  182. package/es/utils/react-if.js +6 -12
  183. package/es/utils/snap-scene.js +27 -34
  184. package/es/utils/snap.js +45 -59
  185. package/es/utils/summarizeCart.js +1 -7
  186. package/es/utils/threeCSG.es6.js +13 -22
  187. package/es/version.js +1 -7
  188. package/lib/index.js +7 -13
  189. package/package.json +1 -1
@@ -1,67 +1,61 @@
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) {
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 _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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
16
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
23
17
  });
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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
27
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
34
28
  });
35
- return _export.Hole.endDrawingHole(state, action.layerID, action.x, action.y).updatedState;
36
- case _constants.END_DRAWING_HOLE_3D:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
32
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
39
33
  });
40
- return _export.Hole.endDrawingHole3D(state, action.layerID, action.x, action.y).updatedState;
41
- case _constants.BEGIN_DRAGGING_HOLE:
34
+ return Hole.endDrawingHole3D(state, action.layerID, action.x, action.y).updatedState;
35
+ case BEGIN_DRAGGING_HOLE:
42
36
  state = state.merge({
43
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
37
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
44
38
  });
45
- return _export.Hole.beginDraggingHole(state, action.layerID, action.holeID, action.x, action.y).updatedState;
46
- case _constants.BEGIN_DRAGGING_HOLE_3D:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
42
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
49
43
  });
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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
49
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
56
50
  });
57
- return _export.Hole.endDraggingHole(state, action.x, action.y).updatedState;
58
- case _constants.END_DRAGGING_HOLE_3D:
51
+ return Hole.endDraggingHole(state, action.x, action.y).updatedState;
52
+ case END_DRAGGING_HOLE_3D:
59
53
  state = state.merge({
60
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
54
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
61
55
  });
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;
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
- "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) {
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 _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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
26
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
33
27
  });
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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
35
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
42
36
  });
43
- return _export.Item.endDrawingItem(state, action.layerID, action.x, action.y).updatedState;
44
- case _constants.BEGIN_DRAGGING_ITEM:
37
+ return Item.endDrawingItem(state, action.layerID, action.x, action.y).updatedState;
38
+ case BEGIN_DRAGGING_ITEM:
45
39
  state = state.merge({
46
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
40
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
47
41
  });
48
- return _export.Item.beginDraggingItem(state, action.layerID, action.itemID, action.x, action.y).updatedState;
49
- case _constants.BEGIN_DRAGGING_ITEM_3D:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
45
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
52
46
  });
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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
58
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
65
59
  });
66
- return _export.Item.endDraggingItem(state, action.x, action.y).updatedState;
67
- case _constants.END_DRAGGING_ITEM_3D:
60
+ return Item.endDraggingItem(state, action.x, action.y).updatedState;
61
+ case END_DRAGGING_ITEM_3D:
68
62
  state = state.merge({
69
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
63
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
70
64
  });
71
- return _export.Item.endDraggingItem3D(state).updatedState;
72
- case _constants.BEGIN_ROTATING_ITEM:
65
+ return Item.endDraggingItem3D(state).updatedState;
66
+ case BEGIN_ROTATING_ITEM:
73
67
  state = state.merge({
74
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
68
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
75
69
  });
76
- return _export.Item.beginRotatingItem(state, action.layerID, action.itemID, action.x, action.y).updatedState;
77
- case _constants.BEGIN_ROTATING_ITEM_3D:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
73
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
80
74
  });
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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
82
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
89
83
  });
90
- return _export.Item.endRotatingItem(state, action.x, action.y).updatedState;
91
- case _constants.END_ROTATING_ITEM_3D:
84
+ return Item.endRotatingItem(state, action.x, action.y).updatedState;
85
+ case END_ROTATING_ITEM_3D:
92
86
  state = state.merge({
93
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
87
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
94
88
  });
95
- return _export.Item.endRotatingItem3D(state, action.x, action.y).updatedState;
96
- case _constants.REPLACE_SUBMODULE:
89
+ return Item.endRotatingItem3D(state, action.x, action.y).updatedState;
90
+ case REPLACE_SUBMODULE:
97
91
  state = state.merge({
98
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
92
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
99
93
  });
100
- return _export.Item.replaceSubmodule(state, action.url).updatedState;
101
- case _constants.ANIMATE_OBJECT:
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 _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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
118
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
125
119
  }); // save history when this actino performed,so undo enable
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;
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
- "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) {
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 _constants.SELECT_TOOL_DRAWING_LINE:
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 _export.Line.selectToolDrawingLine(state, action.sceneComponentType).updatedState;
18
- case _constants.BEGIN_DRAWING_LINE:
11
+ return Line.selectToolDrawingLine(state, action.sceneComponentType).updatedState;
12
+ case BEGIN_DRAWING_LINE:
19
13
  state = state.merge({
20
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
14
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
21
15
  });
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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
23
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
30
24
  });
31
- return _export.Line.endDrawingLine(state, action.x, action.y).updatedState;
32
- case _constants.BEGIN_DRAGGING_LINE:
25
+ return Line.endDrawingLine(state, action.x, action.y).updatedState;
26
+ case BEGIN_DRAGGING_LINE:
33
27
  state = state.merge({
34
- sceneHistory: _export2.history.historyPush(state.sceneHistory, state.scene)
28
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
35
29
  });
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:
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: _export2.history.historyPush(state.sceneHistory, state.scene)
35
+ sceneHistory: history.historyPush(state.sceneHistory, state.scene)
42
36
  });
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;
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
  }