kitchen-simulator 1.1.1-test.64 → 1.1.1-test.65
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 +79 -70
- package/es/KitchenConfiguratorApp.js +107 -98
- 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 -15
- package/es/catalog/factories/area-factory-3d.js +31 -22
- package/es/catalog/factories/area-factory.js +20 -11
- 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 -24
- package/es/catalog/properties/property-color.js +23 -16
- package/es/catalog/properties/property-enum.js +31 -24
- package/es/catalog/properties/property-hidden.js +16 -9
- package/es/catalog/properties/property-lenght-measure.js +45 -38
- package/es/catalog/properties/property-length-measure.js +43 -36
- package/es/catalog/properties/property-length-measure_hole.js +45 -38
- 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 -8
- package/es/catalog/utils/exporter.js +15 -8
- package/es/catalog/utils/geom-utils.js +29 -13
- package/es/catalog/utils/item-loader.js +97 -84
- 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 -8
- package/es/class/area.js +28 -22
- package/es/class/export.js +95 -23
- package/es/class/group.js +59 -53
- package/es/class/guide.js +21 -15
- package/es/class/hole.js +89 -83
- package/es/class/item.js +147 -141
- package/es/class/layer.js +65 -59
- package/es/class/line.js +143 -135
- package/es/class/project.js +98 -90
- package/es/class/vertex.js +35 -29
- 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 -23
- package/es/components/style/cancel-button.js +14 -7
- package/es/components/style/content-container.js +16 -9
- package/es/components/style/content-title.js +20 -11
- package/es/components/style/delete-button.js +17 -8
- package/es/components/style/export.js +120 -30
- package/es/components/style/form-block.js +15 -8
- package/es/components/style/form-color-input.js +14 -7
- package/es/components/style/form-label.js +15 -8
- package/es/components/style/form-number-input.js +49 -41
- package/es/components/style/form-number-input_2.js +44 -36
- package/es/components/style/form-select.js +24 -17
- package/es/components/style/form-slider.js +17 -10
- package/es/components/style/form-submit-button.js +17 -8
- package/es/components/style/form-text-input.js +34 -26
- 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 -10
- package/es/components/viewer2d/group.js +24 -15
- package/es/components/viewer2d/item.js +70 -61
- 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 -39
- package/es/components/viewer2d/rulerY.js +45 -37
- package/es/components/viewer2d/scene.js +38 -30
- package/es/components/viewer2d/snap.js +22 -13
- package/es/components/viewer2d/state.js +27 -18
- package/es/components/viewer2d/utils.js +37 -24
- package/es/components/viewer2d/vertex.js +17 -8
- package/es/components/viewer2d/viewer2d.js +163 -153
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +23 -17
- package/es/components/viewer3d/dcm.js +7 -1
- package/es/components/viewer3d/fbm.js +7 -1
- package/es/components/viewer3d/front3D.js +21 -12
- 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 -39
- 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 +226 -191
- package/es/components/viewer3d/three-memory-cleaner.js +12 -3
- package/es/components/viewer3d/viewer3d-first-person.js +46 -40
- package/es/components/viewer3d/viewer3d.js +202 -196
- package/es/constants.js +358 -349
- package/es/index.js +15 -7
- package/es/models.js +184 -177
- package/es/plugins/SVGLoader.js +53 -48
- package/es/plugins/autosave.js +9 -3
- package/es/plugins/console-debugger.js +12 -5
- 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 -13
- 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 -181
- 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 -9
- package/es/utils/helper.js +63 -39
- package/es/utils/history.js +15 -8
- package/es/utils/id-broker.js +15 -8
- package/es/utils/logger.js +7 -1
- package/es/utils/math.js +12 -5
- package/es/utils/molding.js +144 -119
- package/es/utils/name-generator.js +13 -7
- package/es/utils/objects-utils.js +19 -7
- package/es/utils/phone-validator.js +7 -1
- package/es/utils/process-black-list.js +10 -3
- package/es/utils/react-if.js +12 -6
- package/es/utils/snap-scene.js +34 -27
- package/es/utils/snap.js +59 -45
- package/es/utils/summarizeCart.js +7 -1
- package/es/utils/threeCSG.es6.js +22 -13
- package/es/version.js +7 -1
- package/package.json +1 -1
|
@@ -1,51 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.beginDraggingLine = beginDraggingLine;
|
|
7
|
+
exports.beginDrawingLine = beginDrawingLine;
|
|
8
|
+
exports.endDraggingLine = endDraggingLine;
|
|
9
|
+
exports.endDrawingLine = endDrawingLine;
|
|
10
|
+
exports.selectLine = selectLine;
|
|
11
|
+
exports.selectToolDrawingLine = selectToolDrawingLine;
|
|
12
|
+
exports.setRelatedLine = setRelatedLine;
|
|
13
|
+
exports.stopDrawingLine = stopDrawingLine;
|
|
14
|
+
exports.updateDraggingLine = updateDraggingLine;
|
|
15
|
+
exports.updateDrawingLine = updateDrawingLine;
|
|
16
|
+
var _constants = require("../constants");
|
|
17
|
+
function selectLine(layerID, lineID) {
|
|
3
18
|
return {
|
|
4
|
-
type: SELECT_LINE,
|
|
19
|
+
type: _constants.SELECT_LINE,
|
|
5
20
|
layerID: layerID,
|
|
6
21
|
lineID: lineID
|
|
7
22
|
};
|
|
8
23
|
}
|
|
9
|
-
|
|
24
|
+
function selectToolDrawingLine(sceneComponentType) {
|
|
10
25
|
return {
|
|
11
|
-
type: SELECT_TOOL_DRAWING_LINE,
|
|
26
|
+
type: _constants.SELECT_TOOL_DRAWING_LINE,
|
|
12
27
|
sceneComponentType: sceneComponentType
|
|
13
28
|
};
|
|
14
29
|
}
|
|
15
|
-
|
|
30
|
+
function beginDrawingLine(layerID, x, y, snapMask) {
|
|
16
31
|
return {
|
|
17
|
-
type: BEGIN_DRAWING_LINE,
|
|
32
|
+
type: _constants.BEGIN_DRAWING_LINE,
|
|
18
33
|
layerID: layerID,
|
|
19
34
|
x: x,
|
|
20
35
|
y: y,
|
|
21
36
|
snapMask: snapMask
|
|
22
37
|
};
|
|
23
38
|
}
|
|
24
|
-
|
|
39
|
+
function updateDrawingLine(x, y, relatedLines, snapMask) {
|
|
25
40
|
return {
|
|
26
|
-
type: UPDATE_DRAWING_LINE,
|
|
41
|
+
type: _constants.UPDATE_DRAWING_LINE,
|
|
27
42
|
x: x,
|
|
28
43
|
y: y,
|
|
29
44
|
relatedLines: relatedLines,
|
|
30
45
|
snapMask: snapMask
|
|
31
46
|
};
|
|
32
47
|
}
|
|
33
|
-
|
|
48
|
+
function stopDrawingLine() {
|
|
34
49
|
return {
|
|
35
|
-
type: STOP_DRAWING_LINE
|
|
50
|
+
type: _constants.STOP_DRAWING_LINE
|
|
36
51
|
};
|
|
37
52
|
}
|
|
38
|
-
|
|
53
|
+
function endDrawingLine(x, y, snapMask) {
|
|
39
54
|
return {
|
|
40
|
-
type: END_DRAWING_LINE,
|
|
55
|
+
type: _constants.END_DRAWING_LINE,
|
|
41
56
|
x: x,
|
|
42
57
|
y: y,
|
|
43
58
|
snapMask: snapMask
|
|
44
59
|
};
|
|
45
60
|
}
|
|
46
|
-
|
|
61
|
+
function beginDraggingLine(layerID, lineID, x, y, snapMask) {
|
|
47
62
|
return {
|
|
48
|
-
type: BEGIN_DRAGGING_LINE,
|
|
63
|
+
type: _constants.BEGIN_DRAGGING_LINE,
|
|
49
64
|
layerID: layerID,
|
|
50
65
|
lineID: lineID,
|
|
51
66
|
x: x,
|
|
@@ -53,27 +68,27 @@ export function beginDraggingLine(layerID, lineID, x, y, snapMask) {
|
|
|
53
68
|
snapMask: snapMask
|
|
54
69
|
};
|
|
55
70
|
}
|
|
56
|
-
|
|
71
|
+
function updateDraggingLine(x, y, relatedLines, snapMask) {
|
|
57
72
|
return {
|
|
58
|
-
type: UPDATE_DRAGGING_LINE,
|
|
73
|
+
type: _constants.UPDATE_DRAGGING_LINE,
|
|
59
74
|
x: x,
|
|
60
75
|
y: y,
|
|
61
76
|
relatedLines: relatedLines,
|
|
62
77
|
snapMask: snapMask
|
|
63
78
|
};
|
|
64
79
|
}
|
|
65
|
-
|
|
80
|
+
function endDraggingLine(x, y, relatedLines, snapMask) {
|
|
66
81
|
return {
|
|
67
|
-
type: END_DRAGGING_LINE,
|
|
82
|
+
type: _constants.END_DRAGGING_LINE,
|
|
68
83
|
x: x,
|
|
69
84
|
y: y,
|
|
70
85
|
relatedLines: relatedLines,
|
|
71
86
|
snapMask: snapMask
|
|
72
87
|
};
|
|
73
88
|
}
|
|
74
|
-
|
|
89
|
+
function setRelatedLine(layerID, lineID, intersection) {
|
|
75
90
|
return {
|
|
76
|
-
type: SET_RELATED_LINE,
|
|
91
|
+
type: _constants.SET_RELATED_LINE,
|
|
77
92
|
layerID: layerID,
|
|
78
93
|
lineID: lineID,
|
|
79
94
|
intersection: intersection
|
|
@@ -1,81 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addCircularGuide = addCircularGuide;
|
|
7
|
+
exports.addHorizontalGuide = addHorizontalGuide;
|
|
8
|
+
exports.addVerticalGuide = addVerticalGuide;
|
|
9
|
+
exports.changeCatalogPage = changeCatalogPage;
|
|
10
|
+
exports.copyProperties = copyProperties;
|
|
11
|
+
exports.goBackToCatalogPage = goBackToCatalogPage;
|
|
12
|
+
exports.initCatalog = initCatalog;
|
|
13
|
+
exports.loadProject = loadProject;
|
|
14
|
+
exports.newProject = newProject;
|
|
15
|
+
exports.openCatalog = openCatalog;
|
|
16
|
+
exports.openProjectConfigurator = openProjectConfigurator;
|
|
17
|
+
exports.pasteProperties = pasteProperties;
|
|
18
|
+
exports.pushLastSelectedCatalogElementToHistory = pushLastSelectedCatalogElementToHistory;
|
|
19
|
+
exports.recreate = recreate;
|
|
20
|
+
exports.redo = redo;
|
|
21
|
+
exports.remove = remove;
|
|
22
|
+
exports.removeCircularGuide = removeCircularGuide;
|
|
23
|
+
exports.removeDrawingSupport = removeDrawingSupport;
|
|
24
|
+
exports.removeHorizontalGuide = removeHorizontalGuide;
|
|
25
|
+
exports.removeVerticalGuide = removeVerticalGuide;
|
|
26
|
+
exports.rename = rename;
|
|
27
|
+
exports.rollback = rollback;
|
|
28
|
+
exports.saveProject = saveProject;
|
|
29
|
+
exports.selectAll = selectAll;
|
|
30
|
+
exports.selectToolEdit = selectToolEdit;
|
|
31
|
+
exports.setAlterateState = setAlterateState;
|
|
32
|
+
exports.setHolesAttributes = setHolesAttributes;
|
|
33
|
+
exports.setIsCabinetDrawing = setIsCabinetDrawing;
|
|
34
|
+
exports.setIsHelp = setIsHelp;
|
|
35
|
+
exports.setItemsAttributes = setItemsAttributes;
|
|
36
|
+
exports.setLinesAttributes = setLinesAttributes;
|
|
37
|
+
exports.setMode = setMode;
|
|
38
|
+
exports.setProjectID = setProjectID;
|
|
39
|
+
exports.setProjectProperties = setProjectProperties;
|
|
40
|
+
exports.setProperties = setProperties;
|
|
41
|
+
exports.setStateProperties = setStateProperties;
|
|
42
|
+
exports.shift2doff = shift2doff;
|
|
43
|
+
exports.shift2don = shift2don;
|
|
44
|
+
exports.throwError = throwError;
|
|
45
|
+
exports.throwWarning = throwWarning;
|
|
46
|
+
exports.toggleSnap = toggleSnap;
|
|
47
|
+
exports.uncreate = uncreate;
|
|
48
|
+
exports.undo = undo;
|
|
49
|
+
exports.unselectAll = unselectAll;
|
|
50
|
+
exports.updateMouseCoord = updateMouseCoord;
|
|
51
|
+
exports.updateZoomScale = updateZoomScale;
|
|
52
|
+
var _constants = require("../constants");
|
|
53
|
+
function setIsHelp(isHelp) {
|
|
54
|
+
return {
|
|
55
|
+
type: _constants.SET_IS_HELP,
|
|
5
56
|
isHelp: isHelp
|
|
6
57
|
};
|
|
7
58
|
}
|
|
8
|
-
|
|
59
|
+
function setIsCabinetDrawing(isCabinetDrawing) {
|
|
9
60
|
return {
|
|
10
|
-
type: SET_IS_CABINET_DRAWING,
|
|
61
|
+
type: _constants.SET_IS_CABINET_DRAWING,
|
|
11
62
|
isCabinetDrawing: isCabinetDrawing
|
|
12
63
|
};
|
|
13
64
|
}
|
|
14
|
-
|
|
65
|
+
function setStateProperties(properties) {
|
|
15
66
|
return {
|
|
16
|
-
type: SET_STATE_PROPERTIES,
|
|
67
|
+
type: _constants.SET_STATE_PROPERTIES,
|
|
17
68
|
properties: properties
|
|
18
69
|
};
|
|
19
70
|
}
|
|
20
|
-
|
|
71
|
+
function loadProject(sceneJSON, categoryData) {
|
|
21
72
|
return {
|
|
22
|
-
type: LOAD_PROJECT,
|
|
73
|
+
type: _constants.LOAD_PROJECT,
|
|
23
74
|
sceneJSON: sceneJSON,
|
|
24
75
|
categoryData: categoryData
|
|
25
76
|
};
|
|
26
77
|
}
|
|
27
|
-
|
|
78
|
+
function newProject() {
|
|
28
79
|
return {
|
|
29
|
-
type: NEW_PROJECT
|
|
80
|
+
type: _constants.NEW_PROJECT
|
|
30
81
|
};
|
|
31
82
|
}
|
|
32
|
-
|
|
83
|
+
function saveProject() {
|
|
33
84
|
return {
|
|
34
|
-
type: SAVE_PROJECT
|
|
85
|
+
type: _constants.SAVE_PROJECT
|
|
35
86
|
};
|
|
36
87
|
}
|
|
37
|
-
|
|
88
|
+
function openCatalog() {
|
|
38
89
|
return {
|
|
39
|
-
type: OPEN_CATALOG
|
|
90
|
+
type: _constants.OPEN_CATALOG
|
|
40
91
|
};
|
|
41
92
|
}
|
|
42
|
-
|
|
93
|
+
function changeCatalogPage(newPage, oldPage) {
|
|
43
94
|
return {
|
|
44
|
-
type: CHANGE_CATALOG_PAGE,
|
|
95
|
+
type: _constants.CHANGE_CATALOG_PAGE,
|
|
45
96
|
newPage: newPage,
|
|
46
97
|
oldPage: oldPage
|
|
47
98
|
};
|
|
48
99
|
}
|
|
49
|
-
|
|
100
|
+
function goBackToCatalogPage(newPage) {
|
|
50
101
|
return {
|
|
51
|
-
type: GO_BACK_TO_CATALOG_PAGE,
|
|
102
|
+
type: _constants.GO_BACK_TO_CATALOG_PAGE,
|
|
52
103
|
newPage: newPage
|
|
53
104
|
};
|
|
54
105
|
}
|
|
55
|
-
|
|
106
|
+
function selectToolEdit() {
|
|
56
107
|
return {
|
|
57
|
-
type: SELECT_TOOL_EDIT
|
|
108
|
+
type: _constants.SELECT_TOOL_EDIT
|
|
58
109
|
};
|
|
59
110
|
}
|
|
60
|
-
|
|
111
|
+
function unselectAll() {
|
|
61
112
|
return {
|
|
62
|
-
type: UNSELECT_ALL
|
|
113
|
+
type: _constants.UNSELECT_ALL
|
|
63
114
|
};
|
|
64
115
|
}
|
|
65
|
-
|
|
116
|
+
function setProperties(properties) {
|
|
66
117
|
return {
|
|
67
|
-
type: SET_PROPERTIES,
|
|
118
|
+
type: _constants.SET_PROPERTIES,
|
|
68
119
|
properties: properties
|
|
69
120
|
};
|
|
70
121
|
}
|
|
71
|
-
|
|
122
|
+
function setItemsAttributes(itemsAttributes) {
|
|
72
123
|
itemsAttributes = itemsAttributes.set('rotation', parseFloat(itemsAttributes.get('rotation')));
|
|
73
124
|
return {
|
|
74
|
-
type: SET_ITEMS_ATTRIBUTES,
|
|
125
|
+
type: _constants.SET_ITEMS_ATTRIBUTES,
|
|
75
126
|
itemsAttributes: itemsAttributes
|
|
76
127
|
};
|
|
77
128
|
}
|
|
78
|
-
|
|
129
|
+
function setLinesAttributes(linesAttributes) {
|
|
79
130
|
var isDirect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
80
131
|
var directData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
81
132
|
linesAttributes = linesAttributes.withMutations(function (attributes) {
|
|
@@ -85,197 +136,197 @@ export function setLinesAttributes(linesAttributes) {
|
|
|
85
136
|
attributes.setIn(['vertexTwo', 'y'], parseFloat(linesAttributes.getIn(['vertexTwo', 'y'])));
|
|
86
137
|
});
|
|
87
138
|
return {
|
|
88
|
-
type: SET_LINES_ATTRIBUTES,
|
|
139
|
+
type: _constants.SET_LINES_ATTRIBUTES,
|
|
89
140
|
linesAttributes: linesAttributes,
|
|
90
141
|
isDirect: isDirect,
|
|
91
142
|
directData: directData
|
|
92
143
|
};
|
|
93
144
|
}
|
|
94
|
-
|
|
145
|
+
function setHolesAttributes(holesAttributes) {
|
|
95
146
|
holesAttributes = holesAttributes.set('offset', parseFloat(holesAttributes.get('offset')));
|
|
96
147
|
return {
|
|
97
|
-
type: SET_HOLES_ATTRIBUTES,
|
|
148
|
+
type: _constants.SET_HOLES_ATTRIBUTES,
|
|
98
149
|
holesAttributes: holesAttributes
|
|
99
150
|
};
|
|
100
151
|
}
|
|
101
|
-
|
|
152
|
+
function remove() {
|
|
102
153
|
return {
|
|
103
|
-
type: REMOVE
|
|
154
|
+
type: _constants.REMOVE
|
|
104
155
|
};
|
|
105
156
|
}
|
|
106
|
-
|
|
157
|
+
function undo() {
|
|
107
158
|
return {
|
|
108
|
-
type: UNDO
|
|
159
|
+
type: _constants.UNDO
|
|
109
160
|
};
|
|
110
161
|
}
|
|
111
|
-
|
|
162
|
+
function redo() {
|
|
112
163
|
return {
|
|
113
|
-
type: REDO
|
|
164
|
+
type: _constants.REDO
|
|
114
165
|
};
|
|
115
166
|
}
|
|
116
|
-
|
|
167
|
+
function uncreate() {
|
|
117
168
|
return {
|
|
118
|
-
type: UNCREATE
|
|
169
|
+
type: _constants.UNCREATE
|
|
119
170
|
};
|
|
120
171
|
}
|
|
121
|
-
|
|
172
|
+
function rename(name) {
|
|
122
173
|
return {
|
|
123
|
-
type: PROJECT_RE_NAME,
|
|
174
|
+
type: _constants.PROJECT_RE_NAME,
|
|
124
175
|
name: name
|
|
125
176
|
};
|
|
126
177
|
}
|
|
127
|
-
|
|
178
|
+
function recreate() {
|
|
128
179
|
return {
|
|
129
|
-
type: RECREATE
|
|
180
|
+
type: _constants.RECREATE
|
|
130
181
|
};
|
|
131
182
|
}
|
|
132
|
-
|
|
183
|
+
function shift2doff() {
|
|
133
184
|
return {
|
|
134
|
-
type: SHIFT2DOFF
|
|
185
|
+
type: _constants.SHIFT2DOFF
|
|
135
186
|
};
|
|
136
187
|
}
|
|
137
|
-
|
|
188
|
+
function shift2don() {
|
|
138
189
|
return {
|
|
139
|
-
type: SHIFT2DON
|
|
190
|
+
type: _constants.SHIFT2DON
|
|
140
191
|
};
|
|
141
192
|
}
|
|
142
|
-
|
|
193
|
+
function rollback() {
|
|
143
194
|
return {
|
|
144
|
-
type: ROLLBACK
|
|
195
|
+
type: _constants.ROLLBACK
|
|
145
196
|
};
|
|
146
197
|
}
|
|
147
|
-
|
|
198
|
+
function openProjectConfigurator() {
|
|
148
199
|
return {
|
|
149
|
-
type: OPEN_PROJECT_CONFIGURATOR
|
|
200
|
+
type: _constants.OPEN_PROJECT_CONFIGURATOR
|
|
150
201
|
};
|
|
151
202
|
}
|
|
152
|
-
|
|
203
|
+
function setProjectProperties(properties) {
|
|
153
204
|
return {
|
|
154
|
-
type: SET_PROJECT_PROPERTIES,
|
|
205
|
+
type: _constants.SET_PROJECT_PROPERTIES,
|
|
155
206
|
properties: properties
|
|
156
207
|
};
|
|
157
208
|
}
|
|
158
|
-
|
|
209
|
+
function setProjectID(id) {
|
|
159
210
|
return {
|
|
160
|
-
type: SET_PROJECT_ID,
|
|
211
|
+
type: _constants.SET_PROJECT_ID,
|
|
161
212
|
id: id
|
|
162
213
|
};
|
|
163
214
|
}
|
|
164
|
-
|
|
215
|
+
function initCatalog(catalog) {
|
|
165
216
|
return {
|
|
166
|
-
type: INIT_CATALOG,
|
|
217
|
+
type: _constants.INIT_CATALOG,
|
|
167
218
|
catalog: catalog
|
|
168
219
|
};
|
|
169
220
|
}
|
|
170
|
-
|
|
221
|
+
function updateMouseCoord() {
|
|
171
222
|
var coords = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
172
223
|
x: x,
|
|
173
224
|
y: y
|
|
174
225
|
};
|
|
175
226
|
return {
|
|
176
|
-
type: UPDATE_MOUSE_COORDS,
|
|
227
|
+
type: _constants.UPDATE_MOUSE_COORDS,
|
|
177
228
|
coords: coords
|
|
178
229
|
};
|
|
179
230
|
}
|
|
180
|
-
|
|
231
|
+
function updateZoomScale(scale) {
|
|
181
232
|
return {
|
|
182
|
-
type: UPDATE_ZOOM_SCALE,
|
|
233
|
+
type: _constants.UPDATE_ZOOM_SCALE,
|
|
183
234
|
scale: scale
|
|
184
235
|
};
|
|
185
236
|
}
|
|
186
|
-
|
|
237
|
+
function toggleSnap(mask) {
|
|
187
238
|
return {
|
|
188
|
-
type: TOGGLE_SNAP,
|
|
239
|
+
type: _constants.TOGGLE_SNAP,
|
|
189
240
|
mask: mask
|
|
190
241
|
};
|
|
191
242
|
}
|
|
192
|
-
|
|
243
|
+
function throwError(error) {
|
|
193
244
|
return {
|
|
194
|
-
type: THROW_ERROR,
|
|
245
|
+
type: _constants.THROW_ERROR,
|
|
195
246
|
error: error
|
|
196
247
|
};
|
|
197
248
|
}
|
|
198
|
-
|
|
249
|
+
function throwWarning(warning) {
|
|
199
250
|
return {
|
|
200
|
-
type: THROW_WARNING,
|
|
251
|
+
type: _constants.THROW_WARNING,
|
|
201
252
|
warning: warning
|
|
202
253
|
};
|
|
203
254
|
}
|
|
204
|
-
|
|
255
|
+
function copyProperties(properties) {
|
|
205
256
|
return {
|
|
206
|
-
type: COPY_PROPERTIES,
|
|
257
|
+
type: _constants.COPY_PROPERTIES,
|
|
207
258
|
properties: properties
|
|
208
259
|
};
|
|
209
260
|
}
|
|
210
|
-
|
|
261
|
+
function pasteProperties() {
|
|
211
262
|
return {
|
|
212
|
-
type: PASTE_PROPERTIES
|
|
263
|
+
type: _constants.PASTE_PROPERTIES
|
|
213
264
|
};
|
|
214
265
|
}
|
|
215
|
-
|
|
266
|
+
function pushLastSelectedCatalogElementToHistory(element) {
|
|
216
267
|
return {
|
|
217
|
-
type: PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY,
|
|
268
|
+
type: _constants.PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY,
|
|
218
269
|
element: element
|
|
219
270
|
};
|
|
220
271
|
}
|
|
221
|
-
|
|
272
|
+
function setAlterateState() {
|
|
222
273
|
return {
|
|
223
|
-
type: ALTERATE_STATE
|
|
274
|
+
type: _constants.ALTERATE_STATE
|
|
224
275
|
};
|
|
225
276
|
}
|
|
226
|
-
|
|
277
|
+
function setMode(mode) {
|
|
227
278
|
return {
|
|
228
|
-
type: SET_MODE,
|
|
279
|
+
type: _constants.SET_MODE,
|
|
229
280
|
mode: mode
|
|
230
281
|
};
|
|
231
282
|
}
|
|
232
|
-
|
|
283
|
+
function addHorizontalGuide(coordinate) {
|
|
233
284
|
return {
|
|
234
|
-
type: ADD_HORIZONTAL_GUIDE,
|
|
285
|
+
type: _constants.ADD_HORIZONTAL_GUIDE,
|
|
235
286
|
coordinate: coordinate
|
|
236
287
|
};
|
|
237
288
|
}
|
|
238
|
-
|
|
289
|
+
function addVerticalGuide(coordinate) {
|
|
239
290
|
return {
|
|
240
|
-
type: ADD_VERTICAL_GUIDE,
|
|
291
|
+
type: _constants.ADD_VERTICAL_GUIDE,
|
|
241
292
|
coordinate: coordinate
|
|
242
293
|
};
|
|
243
294
|
}
|
|
244
|
-
|
|
295
|
+
function addCircularGuide(x, y, radius) {
|
|
245
296
|
return {
|
|
246
|
-
type: ADD_CIRCULAR_GUIDE,
|
|
297
|
+
type: _constants.ADD_CIRCULAR_GUIDE,
|
|
247
298
|
x: x,
|
|
248
299
|
y: y,
|
|
249
300
|
radius: radius
|
|
250
301
|
};
|
|
251
302
|
}
|
|
252
|
-
|
|
303
|
+
function removeHorizontalGuide(guideID) {
|
|
253
304
|
return {
|
|
254
|
-
type: REMOVE_HORIZONTAL_GUIDE,
|
|
305
|
+
type: _constants.REMOVE_HORIZONTAL_GUIDE,
|
|
255
306
|
guideID: guideID
|
|
256
307
|
};
|
|
257
308
|
}
|
|
258
|
-
|
|
309
|
+
function removeVerticalGuide(guideID) {
|
|
259
310
|
return {
|
|
260
|
-
type: REMOVE_VERTICAL_GUIDE,
|
|
311
|
+
type: _constants.REMOVE_VERTICAL_GUIDE,
|
|
261
312
|
guideID: guideID
|
|
262
313
|
};
|
|
263
314
|
}
|
|
264
|
-
|
|
315
|
+
function removeCircularGuide(guideID) {
|
|
265
316
|
return {
|
|
266
|
-
type: REMOVE_CIRCULAR_GUIDE,
|
|
317
|
+
type: _constants.REMOVE_CIRCULAR_GUIDE,
|
|
267
318
|
guideID: guideID
|
|
268
319
|
};
|
|
269
320
|
}
|
|
270
|
-
|
|
321
|
+
function removeDrawingSupport() {
|
|
271
322
|
return {
|
|
272
|
-
type: REMOVE_DRAWING_SUPPORT
|
|
323
|
+
type: _constants.REMOVE_DRAWING_SUPPORT
|
|
273
324
|
};
|
|
274
325
|
}
|
|
275
|
-
|
|
326
|
+
function selectAll() {
|
|
276
327
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
277
328
|
return {
|
|
278
|
-
type: SELECT_ALL,
|
|
329
|
+
type: _constants.SELECT_ALL,
|
|
279
330
|
value: value
|
|
280
331
|
};
|
|
281
332
|
}
|
|
@@ -1,33 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addLayer = addLayer;
|
|
7
|
+
exports.removeLayer = removeLayer;
|
|
8
|
+
exports.selectLayer = selectLayer;
|
|
9
|
+
exports.setLayerProperties = setLayerProperties;
|
|
10
|
+
exports.updateMovingState = updateMovingState;
|
|
11
|
+
var _constants = require("../constants");
|
|
12
|
+
function selectLayer(layerID) {
|
|
3
13
|
return {
|
|
4
|
-
type: SELECT_LAYER,
|
|
14
|
+
type: _constants.SELECT_LAYER,
|
|
5
15
|
layerID: layerID
|
|
6
16
|
};
|
|
7
17
|
}
|
|
8
|
-
|
|
18
|
+
function addLayer(name, altitude) {
|
|
9
19
|
return {
|
|
10
|
-
type: ADD_LAYER,
|
|
20
|
+
type: _constants.ADD_LAYER,
|
|
11
21
|
name: name,
|
|
12
22
|
altitude: altitude
|
|
13
23
|
};
|
|
14
24
|
}
|
|
15
|
-
|
|
25
|
+
function setLayerProperties(layerID, properties) {
|
|
16
26
|
return {
|
|
17
|
-
type: SET_LAYER_PROPERTIES,
|
|
27
|
+
type: _constants.SET_LAYER_PROPERTIES,
|
|
18
28
|
layerID: layerID,
|
|
19
29
|
properties: properties
|
|
20
30
|
};
|
|
21
31
|
}
|
|
22
|
-
|
|
32
|
+
function removeLayer(layerID) {
|
|
23
33
|
return {
|
|
24
|
-
type: REMOVE_LAYER,
|
|
34
|
+
type: _constants.REMOVE_LAYER,
|
|
25
35
|
layerID: layerID
|
|
26
36
|
};
|
|
27
37
|
}
|
|
28
|
-
|
|
38
|
+
function updateMovingState(showflag) {
|
|
29
39
|
return {
|
|
30
|
-
type: UPDATE_MOVING_STATE,
|
|
40
|
+
type: _constants.UPDATE_MOVING_STATE,
|
|
31
41
|
showflag: showflag
|
|
32
42
|
};
|
|
33
43
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.beginDraggingVertex = beginDraggingVertex;
|
|
7
|
+
exports.endDraggingVertex = endDraggingVertex;
|
|
8
|
+
exports.updateDraggingVertex = updateDraggingVertex;
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
function beginDraggingVertex(layerID, vertexID, x, y, snapMask) {
|
|
3
11
|
return {
|
|
4
|
-
type: BEGIN_DRAGGING_VERTEX,
|
|
12
|
+
type: _constants.BEGIN_DRAGGING_VERTEX,
|
|
5
13
|
layerID: layerID,
|
|
6
14
|
vertexID: vertexID,
|
|
7
15
|
x: x,
|
|
@@ -9,17 +17,17 @@ export function beginDraggingVertex(layerID, vertexID, x, y, snapMask) {
|
|
|
9
17
|
snapMask: snapMask
|
|
10
18
|
};
|
|
11
19
|
}
|
|
12
|
-
|
|
20
|
+
function updateDraggingVertex(x, y, snapMask) {
|
|
13
21
|
return {
|
|
14
|
-
type: UPDATE_DRAGGING_VERTEX,
|
|
22
|
+
type: _constants.UPDATE_DRAGGING_VERTEX,
|
|
15
23
|
x: x,
|
|
16
24
|
y: y,
|
|
17
25
|
snapMask: snapMask
|
|
18
26
|
};
|
|
19
27
|
}
|
|
20
|
-
|
|
28
|
+
function endDraggingVertex(x, y, snapMask) {
|
|
21
29
|
return {
|
|
22
|
-
type: END_DRAGGING_VERTEX,
|
|
30
|
+
type: _constants.END_DRAGGING_VERTEX,
|
|
23
31
|
x: x,
|
|
24
32
|
y: y,
|
|
25
33
|
snapMask: snapMask
|