kitchen-simulator 5.0.0-test.4 → 5.0.0-test.5
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/package.json +1 -2
- package/src/@history.js +0 -3
- package/src/AppContext.js +0 -5
- package/src/KitchenConfigurator.jsx +0 -1517
- package/src/KitchenConfiguratorApp.jsx +0 -443
- package/src/actions/area-actions.js +0 -15
- package/src/actions/export.js +0 -38
- package/src/actions/groups-actions.js +0 -102
- package/src/actions/holes-actions.js +0 -152
- package/src/actions/items-actions.js +0 -393
- package/src/actions/lines-actions.js +0 -103
- package/src/actions/project-actions.js +0 -391
- package/src/actions/scene-actions.js +0 -44
- package/src/actions/user-actions.js +0 -75
- package/src/actions/vertices-actions.js +0 -34
- package/src/actions/viewer2d-actions.js +0 -79
- package/src/actions/viewer3d-actions.js +0 -32
- package/src/catalog/areas/area/planner-element.jsx +0 -43
- package/src/catalog/areas/area/textures/ceramic-tile.jpg +0 -0
- package/src/catalog/areas/area/textures/grass.jpg +0 -0
- package/src/catalog/areas/area/textures/parquet.jpg +0 -0
- package/src/catalog/areas/area/textures/strand-porcelain.jpg +0 -0
- package/src/catalog/areas/area/textures/tile1.jpg +0 -0
- package/src/catalog/back.png +0 -0
- package/src/catalog/catalog.js +0 -258
- package/src/catalog/doors.png +0 -0
- package/src/catalog/doorways.png +0 -0
- package/src/catalog/envMap/nx.hdr +0 -0
- package/src/catalog/envMap/ny.hdr +0 -0
- package/src/catalog/envMap/nz.hdr +0 -0
- package/src/catalog/envMap/px.hdr +0 -0
- package/src/catalog/envMap/py.hdr +0 -0
- package/src/catalog/envMap/pz.hdr +0 -0
- package/src/catalog/factories/area-factory-3d.js +0 -252
- package/src/catalog/factories/area-factory.jsx +0 -102
- package/src/catalog/factories/export.js +0 -9
- package/src/catalog/factories/wall-factory-3d.js +0 -296
- package/src/catalog/factories/wall-factory.jsx +0 -321
- package/src/catalog/holes/door-closet/planner-element.jsx +0 -251
- package/src/catalog/holes/door-double/door_double.png +0 -0
- package/src/catalog/holes/door-double/planner-element.jsx +0 -391
- package/src/catalog/holes/door-exterior/planner-element.jsx +0 -245
- package/src/catalog/holes/door-interior/planner-element.jsx +0 -256
- package/src/catalog/holes/door-panic/panicDoor.png +0 -0
- package/src/catalog/holes/door-panic/planner-element.jsx +0 -594
- package/src/catalog/holes/door-panic-double/panicDoorDouble.png +0 -0
- package/src/catalog/holes/door-panic-double/planner-element.jsx +0 -574
- package/src/catalog/holes/door-sliding/planner-element.jsx +0 -256
- package/src/catalog/holes/doorway-framed/planner-element.jsx +0 -169
- package/src/catalog/holes/doorway-frameless/planner-element.jsx +0 -116
- package/src/catalog/holes/gate/gate.jpg +0 -0
- package/src/catalog/holes/window-clear/planner-element.jsx +0 -181
- package/src/catalog/holes/window-clear/texture.png +0 -0
- package/src/catalog/holes/window-cross/planner-element.jsx +0 -180
- package/src/catalog/holes/window-cross/texture.png +0 -0
- package/src/catalog/holes/window-double-hung/planner-element.jsx +0 -366
- package/src/catalog/holes/window-double-hung/texture.png +0 -0
- package/src/catalog/holes/window-vertical/planner-element.jsx +0 -290
- package/src/catalog/holes/window-vertical/texture.png +0 -0
- package/src/catalog/lines/wall/planner-element.jsx +0 -73
- package/src/catalog/lines/wall/textures/bricks-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks-normal2.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks2.jpg +0 -0
- package/src/catalog/lines/wall/textures/bricks3.jpg +0 -0
- package/src/catalog/lines/wall/textures/morden-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/morden.jpg +0 -0
- package/src/catalog/lines/wall/textures/painted-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/painted.jpg +0 -0
- package/src/catalog/lines/wall/textures/plaster-normal.jpg +0 -0
- package/src/catalog/lines/wall/textures/plaster.jpg +0 -0
- package/src/catalog/lines/wall/wall.png +0 -0
- package/src/catalog/molding/molding-dcm/planner-element.jsx +0 -35
- package/src/catalog/molding/molding-dcm/texture.png +0 -0
- package/src/catalog/molding/molding-fbm/planner-element.jsx +0 -35
- package/src/catalog/molding/molding-fbm/texture.png +0 -0
- package/src/catalog/molding/molding-lrm/planner-element.jsx +0 -35
- package/src/catalog/molding/molding-lrm/texture.png +0 -0
- package/src/catalog/properties/export.js +0 -33
- package/src/catalog/properties/property-checkbox.jsx +0 -123
- package/src/catalog/properties/property-color.jsx +0 -52
- package/src/catalog/properties/property-enum.jsx +0 -87
- package/src/catalog/properties/property-hidden.jsx +0 -22
- package/src/catalog/properties/property-lenght-measure.jsx +0 -113
- package/src/catalog/properties/property-length-measure.jsx +0 -129
- package/src/catalog/properties/property-length-measure_hole.jsx +0 -110
- package/src/catalog/properties/property-number.jsx +0 -63
- package/src/catalog/properties/property-read-only.jsx +0 -37
- package/src/catalog/properties/property-string.jsx +0 -59
- package/src/catalog/properties/property-toggle.jsx +0 -51
- package/src/catalog/properties/shared-property-style.js +0 -13
- package/src/catalog/utils/FuseUtils.js +0 -61
- package/src/catalog/utils/exporter.js +0 -173
- package/src/catalog/utils/geom-utils.js +0 -301
- package/src/catalog/utils/item-loader.jsx +0 -2122
- package/src/catalog/utils/load-obj.js +0 -113
- package/src/catalog/utils/mtl-loader.js +0 -462
- package/src/catalog/utils/obj-loader.js +0 -544
- package/src/catalog/windows.png +0 -0
- package/src/class/FuseUtils.js +0 -61
- package/src/class/area.js +0 -159
- package/src/class/export.js +0 -37
- package/src/class/group.js +0 -565
- package/src/class/guide.js +0 -44
- package/src/class/hole.js +0 -1359
- package/src/class/item.js +0 -2050
- package/src/class/layer.js +0 -926
- package/src/class/line.js +0 -1780
- package/src/class/project.js +0 -875
- package/src/class/vertex.js +0 -409
- package/src/components/atoms/Snackbar/index.jsx +0 -43
- package/src/components/atoms/radio-button/index.jsx +0 -20
- package/src/components/atoms/radio-button/styles.js +0 -56
- package/src/components/button/MainButton.jsx +0 -157
- package/src/components/button/ToggleMeasureButton.jsx +0 -65
- package/src/components/catalog-view/catalog-breadcrumb.jsx +0 -53
- package/src/components/catalog-view/catalog-item.jsx +0 -229
- package/src/components/catalog-view/catalog-list.jsx +0 -173
- package/src/components/catalog-view/catalog-page-item.jsx +0 -110
- package/src/components/catalog-view/catalog-turn-back-page-item.jsx +0 -80
- package/src/components/configurator/custom-configurator.jsx +0 -77
- package/src/components/configurator/project-configurator.jsx +0 -120
- package/src/components/content.jsx +0 -136
- package/src/components/export.js +0 -36
- package/src/components/firstsetting/button/styles.js +0 -223
- package/src/components/firstsetting/export.js +0 -9
- package/src/components/firstsetting/firstsetting-content-button.jsx +0 -198
- package/src/components/firstsetting/firstsetting-toggle-button.jsx +0 -101
- package/src/components/firstsetting/firstsetting.jsx +0 -814
- package/src/components/footerbar/button/ControlButton.jsx +0 -43
- package/src/components/footerbar/button/DirectionButton.jsx +0 -54
- package/src/components/footerbar/button/DirectionPanSpinButton.jsx +0 -36
- package/src/components/footerbar/button/ToggleButton.jsx +0 -58
- package/src/components/footerbar/button/ToggleConvertButton.jsx +0 -48
- package/src/components/footerbar/button/ToggleMeasureButton.jsx +0 -33
- package/src/components/footerbar/button/styles.js +0 -217
- package/src/components/footerbar/export.js +0 -9
- package/src/components/footerbar/footer-content-button.jsx +0 -198
- package/src/components/footerbar/footer-toggle-button.jsx +0 -101
- package/src/components/footerbar/footerbar.jsx +0 -1103
- package/src/components/footerbar/styles.js +0 -263
- package/src/components/header/button/MenuButton.jsx +0 -46
- package/src/components/header/button/SaveButton.jsx +0 -54
- package/src/components/header/button/styles.js +0 -181
- package/src/components/header/export.js +0 -5
- package/src/components/header/header.jsx +0 -631
- package/src/components/header/header.style.css +0 -47
- package/src/components/header/styles.js +0 -320
- package/src/components/login/Login.js +0 -77
- package/src/components/login/LoginForm/index.js +0 -108
- package/src/components/login/Register.js +0 -83
- package/src/components/login/RegisterForm/index.js +0 -171
- package/src/components/login/jwtService.js +0 -201
- package/src/components/login/style.css +0 -158
- package/src/components/login/style.scss +0 -260
- package/src/components/molecules/slider/index.jsx +0 -15
- package/src/components/molecules/slider/styles.js +0 -0
- package/src/components/molecules/slider/styles.scss +0 -3
- package/src/components/myprojects/export.js +0 -5
- package/src/components/myprojects/index.jsx +0 -445
- package/src/components/myprojects/styles.js +0 -241
- package/src/components/sidebar/custom-accordion.jsx +0 -48
- package/src/components/sidebar/export.js +0 -15
- package/src/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.jsx +0 -73
- package/src/components/sidebar/panel-element-editor/attributes-editor/confirm-popup.jsx +0 -101
- package/src/components/sidebar/panel-element-editor/attributes-editor/hole-attributes-editor.jsx +0 -149
- package/src/components/sidebar/panel-element-editor/attributes-editor/item-attributes-editor.jsx +0 -316
- package/src/components/sidebar/panel-element-editor/attributes-editor/line-attributes-editor.jsx +0 -108
- package/src/components/sidebar/panel-element-editor/element-editor.jsx +0 -1070
- package/src/components/sidebar/panel-element-editor/multi-elements-editor.jsx +0 -0
- package/src/components/sidebar/panel-element-editor/panel-element-editor.jsx +0 -104
- package/src/components/sidebar/panel-element-editor/panel-multi-elements-editor.jsx +0 -155
- package/src/components/sidebar/panel-group-editor.jsx +0 -272
- package/src/components/sidebar/panel-groups.jsx +0 -310
- package/src/components/sidebar/panel-guides.jsx +0 -192
- package/src/components/sidebar/panel-layer-elements.jsx +0 -298
- package/src/components/sidebar/panel-layers.jsx +0 -381
- package/src/components/sidebar/panel.jsx +0 -71
- package/src/components/sidebar/sidebar.jsx +0 -106
- package/src/components/sidebar/toolbar-panel.jsx +0 -139
- package/src/components/sign/export.js +0 -7
- package/src/components/sign/main/index.jsx +0 -523
- package/src/components/sign/main/styles.js +0 -163
- package/src/components/style/button.jsx +0 -95
- package/src/components/style/cancel-button.jsx +0 -20
- package/src/components/style/content-container.jsx +0 -29
- package/src/components/style/content-title.jsx +0 -20
- package/src/components/style/delete-button.jsx +0 -23
- package/src/components/style/export.jsx +0 -48
- package/src/components/style/form-block.jsx +0 -13
- package/src/components/style/form-color-input.jsx +0 -27
- package/src/components/style/form-label.jsx +0 -15
- package/src/components/style/form-number-input.jsx +0 -196
- package/src/components/style/form-number-input_2.jsx +0 -191
- package/src/components/style/form-select.jsx +0 -38
- package/src/components/style/form-slider.jsx +0 -36
- package/src/components/style/form-submit-button.jsx +0 -23
- package/src/components/style/form-text-input.jsx +0 -65
- package/src/components/toolbar/button/ControlButton.jsx +0 -41
- package/src/components/toolbar/button/DirectionButton.jsx +0 -34
- package/src/components/toolbar/button/RightButton.jsx +0 -103
- package/src/components/toolbar/button/ToggleButton.jsx +0 -41
- package/src/components/toolbar/button/index.jsx +0 -55
- package/src/components/toolbar/button/styles.js +0 -127
- package/src/components/toolbar/components/DoorStyleMenu.jsx +0 -103
- package/src/components/toolbar/components/Pricing.jsx +0 -126
- package/src/components/toolbar/components/ReviewForQuote.jsx +0 -635
- package/src/components/toolbar/export.js +0 -21
- package/src/components/toolbar/main/Alert.js +0 -122
- package/src/components/toolbar/main/TakePictureModal.jsx +0 -104
- package/src/components/toolbar/main/confirm-popup.jsx +0 -99
- package/src/components/toolbar/main/index.jsx +0 -5687
- package/src/components/toolbar/main/lShaped.json +0 -311
- package/src/components/toolbar/main/longNarrow.json +0 -238
- package/src/components/toolbar/main/myComponents.js +0 -123
- package/src/components/toolbar/main/oRectangle.json +0 -220
- package/src/components/toolbar/main/rectangle.json +0 -238
- package/src/components/toolbar/main/style.css +0 -107
- package/src/components/toolbar/main/styles.js +0 -696
- package/src/components/toolbar/plugin-item.jsx +0 -123
- package/src/components/toolbar/popup/appliance/appliance-category/index.jsx +0 -73
- package/src/components/toolbar/popup/appliance/choose-appliance/index.jsx +0 -102
- package/src/components/toolbar/popup/appliance/index.jsx +0 -83
- package/src/components/toolbar/popup/autosaveprompt/index.jsx +0 -150
- package/src/components/toolbar/popup/autosaveprompt/styles.css +0 -64
- package/src/components/toolbar/popup/autosaveprompt/styles.js +0 -40
- package/src/components/toolbar/popup/cabinet/cabinet-category/index.jsx +0 -73
- package/src/components/toolbar/popup/cabinet/choose-product/index.jsx +0 -119
- package/src/components/toolbar/popup/cabinet/index.jsx +0 -85
- package/src/components/toolbar/popup/doorStyle/choose-style/index.jsx +0 -63
- package/src/components/toolbar/popup/doorStyle/index.jsx +0 -71
- package/src/components/toolbar/popup/doorStyle/style-category/index.jsx +0 -139
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryContext.js +0 -2
- package/src/components/toolbar/popup/downloadsummary/downloadSummaryTemp.jsx +0 -157
- package/src/components/toolbar/popup/downloadsummary/index.jsx +0 -643
- package/src/components/toolbar/popup/downloadsummary/show2D/show2DView.jsx +0 -51
- package/src/components/toolbar/popup/downloadsummary/show2D/viewer2DDownLoad.jsx +0 -175
- package/src/components/toolbar/popup/downloadsummary/show3D/show3DView.jsx +0 -283
- package/src/components/toolbar/popup/downloadsummary/show3D/viewer3DDownLoad.jsx +0 -2257
- package/src/components/toolbar/popup/downloadsummary/showCabinetInfo.js +0 -93
- package/src/components/toolbar/popup/downloadsummary/showElevation/showElevationView.jsx +0 -132
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewer3DElevationDownload.jsx +0 -2198
- package/src/components/toolbar/popup/downloadsummary/showElevation/viewerElevationDownload.jsx +0 -152
- package/src/components/toolbar/popup/downloadsummary/showWarranty.jsx +0 -149
- package/src/components/toolbar/popup/downloadsummary/styles.css +0 -177
- package/src/components/toolbar/popup/downloadsummary/styles.js +0 -453
- package/src/components/toolbar/popup/finishingtouch/category/index.jsx +0 -34
- package/src/components/toolbar/popup/finishingtouch/index.jsx +0 -58
- package/src/components/toolbar/popup/finishingtouch/material-edit.jsx +0 -112
- package/src/components/toolbar/popup/finishingtouch/product/index.jsx +0 -116
- package/src/components/toolbar/popup/floorplan/choose-floor/confirm-popup.jsx +0 -101
- package/src/components/toolbar/popup/floorplan/choose-floor/index.jsx +0 -254
- package/src/components/toolbar/popup/floorplan/choose-floor/lShaped.json +0 -311
- package/src/components/toolbar/popup/floorplan/choose-floor/longNarrow.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/oRectangle.json +0 -220
- package/src/components/toolbar/popup/floorplan/choose-floor/rectangle.json +0 -238
- package/src/components/toolbar/popup/floorplan/choose-floor/styles.js +0 -86
- package/src/components/toolbar/popup/floorplan/floor-category/index.jsx +0 -109
- package/src/components/toolbar/popup/floorplan/index.jsx +0 -60
- package/src/components/toolbar/popup/index.jsx +0 -241
- package/src/components/toolbar/popup/newproject/index.jsx +0 -59
- package/src/components/toolbar/popup/newproject/styles.css +0 -64
- package/src/components/toolbar/popup/newproject/styles.js +0 -41
- package/src/components/toolbar/popup/product/appliance.jsx +0 -54
- package/src/components/toolbar/popup/product/cabinetproduct.jsx +0 -15
- package/src/components/toolbar/popup/product/doorstyle.jsx +0 -58
- package/src/components/toolbar/popup/product/doorstyleproduct.jsx +0 -47
- package/src/components/toolbar/popup/product/floor.jsx +0 -36
- package/src/components/toolbar/popup/product/floorproduct.jsx +0 -42
- package/src/components/toolbar/popup/product/index.jsx +0 -36
- package/src/components/toolbar/popup/product/primary.jsx +0 -77
- package/src/components/toolbar/popup/product/productline.jsx +0 -93
- package/src/components/toolbar/popup/product/reviewItem.jsx +0 -427
- package/src/components/toolbar/popup/product/reviewMolding.jsx +0 -310
- package/src/components/toolbar/popup/product/style.css +0 -54
- package/src/components/toolbar/popup/product/styles.js +0 -260
- package/src/components/toolbar/popup/savedesign/FullPictureForm.jsx +0 -146
- package/src/components/toolbar/popup/savedesign/index.jsx +0 -495
- package/src/components/toolbar/popup/savedesign/savedesign.style.css +0 -16
- package/src/components/toolbar/popup/savedesign/styles.js +0 -151
- package/src/components/toolbar/popup/setDoorStyleOption/index.jsx +0 -87
- package/src/components/toolbar/popup/styles.js +0 -909
- package/src/components/toolbar/popup/submitforquote/AddToCartOptions.jsx +0 -192
- package/src/components/toolbar/popup/submitforquote/CustomerRequestsForm.jsx +0 -96
- package/src/components/toolbar/popup/submitforquote/SkipDesignerReview.jsx +0 -54
- package/src/components/toolbar/popup/submitforquote/StepDots.jsx +0 -25
- package/src/components/toolbar/popup/submitforquote/cart-choice.jsx +0 -116
- package/src/components/toolbar/popup/submitforquote/doorstyle-menus.js +0 -38
- package/src/components/toolbar/popup/submitforquote/index.jsx +0 -698
- package/src/components/toolbar/popup/submitforquote/styles.css +0 -105
- package/src/components/toolbar/popup/submitforquote/styles.js +0 -294
- package/src/components/toolbar/popup/submitprompt/index.jsx +0 -89
- package/src/components/toolbar/popup/submitprompt/styles.css +0 -64
- package/src/components/toolbar/popup/submitprompt/styles.js +0 -42
- package/src/components/toolbar/toolbar-button.jsx +0 -90
- package/src/components/toolbar/toolbar-load-button.jsx +0 -36
- package/src/components/toolbar/toolbar-save-button.jsx +0 -32
- package/src/components/tutorial-view/Modal.jsx +0 -584
- package/src/components/tutorial-view/style.css +0 -111
- package/src/components/tutorial-view/styles.js +0 -65
- package/src/components/viewer2d/area.jsx +0 -98
- package/src/components/viewer2d/export.js +0 -48
- package/src/components/viewer2d/grids/grid-horizontal-streak.jsx +0 -40
- package/src/components/viewer2d/grids/grid-streak.jsx +0 -32
- package/src/components/viewer2d/grids/grid-vertical-streak.jsx +0 -41
- package/src/components/viewer2d/grids/grids.jsx +0 -30
- package/src/components/viewer2d/group.jsx +0 -57
- package/src/components/viewer2d/item.jsx +0 -618
- package/src/components/viewer2d/layer.jsx +0 -214
- package/src/components/viewer2d/line.jsx +0 -1358
- package/src/components/viewer2d/ruler.jsx +0 -136
- package/src/components/viewer2d/rulerDist.jsx +0 -192
- package/src/components/viewer2d/rulerX.jsx +0 -141
- package/src/components/viewer2d/rulerY.jsx +0 -138
- package/src/components/viewer2d/scene.jsx +0 -94
- package/src/components/viewer2d/snap.jsx +0 -118
- package/src/components/viewer2d/state.jsx +0 -77
- package/src/components/viewer2d/utils.js +0 -195
- package/src/components/viewer2d/vertex.jsx +0 -76
- package/src/components/viewer2d/viewer2d.jsx +0 -1830
- package/src/components/viewer3d/camera-controls-module/camera-controls.module.js +0 -3078
- package/src/components/viewer3d/dcm.js +0 -226
- package/src/components/viewer3d/fbm.js +0 -383
- package/src/components/viewer3d/front3D.jsx +0 -63
- package/src/components/viewer3d/grid-creator.js +0 -25
- package/src/components/viewer3d/grids/grid-horizontal-streak.js +0 -41
- package/src/components/viewer3d/grids/grid-streak.js +0 -34
- package/src/components/viewer3d/grids/grid-vertical-streak.js +0 -42
- package/src/components/viewer3d/libs/first-person-controls.js +0 -70
- package/src/components/viewer3d/libs/helvetiker_regular.typeface.js +0 -1265
- package/src/components/viewer3d/libs/mtl-loader.js +0 -462
- package/src/components/viewer3d/libs/obj-loader.js +0 -653
- package/src/components/viewer3d/libs/orbit-controls.js +0 -945
- package/src/components/viewer3d/libs/pointer-lock-controls.js +0 -67
- package/src/components/viewer3d/lrm.js +0 -358
- package/src/components/viewer3d/model.js +0 -830
- package/src/components/viewer3d/pointer-lock-navigation.js +0 -140
- package/src/components/viewer3d/ruler-utils/itemRect.jsx +0 -91
- package/src/components/viewer3d/ruler-utils/layer3D.jsx +0 -528
- package/src/components/viewer3d/ruler-utils/ruler3D.jsx +0 -218
- package/src/components/viewer3d/ruler-utils/scene3D.jsx +0 -87
- package/src/components/viewer3d/ruler-utils/state3D.jsx +0 -25
- package/src/components/viewer3d/scene-creator.js +0 -5172
- package/src/components/viewer3d/three-memory-cleaner.js +0 -65
- package/src/components/viewer3d/viewer3d-first-person.js +0 -395
- package/src/components/viewer3d/viewer3d.js +0 -3376
- package/src/components/wizardstep/button/styles.js +0 -677
- package/src/components/wizardstep/export.js +0 -5
- package/src/components/wizardstep/index.jsx +0 -1372
- package/src/components/wizardstep/styles.js +0 -688
- package/src/components/wizardstep/wizardstep-content-button.jsx +0 -198
- package/src/components/wizardstep/wizardstep-toggle-button.jsx +0 -101
- package/src/constants.js +0 -731
- package/src/hooks/useCheckCart.js +0 -38
- package/src/hooks/useGetPricesBySku.js +0 -59
- package/src/hooks/useValidateToken.js +0 -181
- package/src/index.js +0 -32
- package/src/models.js +0 -541
- package/src/plugins/SVGLoader.js +0 -1991
- package/src/plugins/autosave.js +0 -39
- package/src/plugins/console-debugger.js +0 -36
- package/src/plugins/export.js +0 -11
- package/src/plugins/keyboard.js +0 -194
- package/src/reducers/areas-reducer.js +0 -13
- package/src/reducers/export.js +0 -39
- package/src/reducers/groups-reducer.js +0 -73
- package/src/reducers/holes-reducer.js +0 -125
- package/src/reducers/items-reducer.js +0 -286
- package/src/reducers/lines-reducer.js +0 -96
- package/src/reducers/project-reducer.js +0 -239
- package/src/reducers/reducer.js +0 -59
- package/src/reducers/scene-reducer.js +0 -41
- package/src/reducers/user-reducer.js +0 -30
- package/src/reducers/vertices-reducer.js +0 -34
- package/src/reducers/viewer2d-reducer.js +0 -81
- package/src/reducers/viewer3d-reducer.js +0 -65
- package/src/shared-style.js +0 -72
- package/src/styles/export.js +0 -7
- package/src/styles/tabs.css +0 -40
- package/src/translator/en.js +0 -106
- package/src/translator/it.js +0 -80
- package/src/translator/ru.js +0 -80
- package/src/translator/translator.js +0 -81
- package/src/utils/browser.js +0 -36
- package/src/utils/email-validator.js +0 -5
- package/src/utils/export.js +0 -39
- package/src/utils/geometry.js +0 -2572
- package/src/utils/get-edges-of-subgraphs.js +0 -29
- package/src/utils/graph-cycles.js +0 -259
- package/src/utils/graph-inner-cycles.js +0 -49
- package/src/utils/graph.js +0 -147
- package/src/utils/helper.js +0 -431
- package/src/utils/history.js +0 -37
- package/src/utils/id-broker.js +0 -9
- package/src/utils/logger.js +0 -8
- package/src/utils/math.js +0 -51
- package/src/utils/molding.js +0 -973
- package/src/utils/name-generator.js +0 -5
- package/src/utils/objects-utils.js +0 -56
- package/src/utils/phone-validator.js +0 -4
- package/src/utils/process-black-list.js +0 -10
- package/src/utils/react-if.jsx +0 -20
- package/src/utils/snap-scene.js +0 -102
- package/src/utils/snap.js +0 -184
- package/src/utils/threeCSG.es6.js +0 -578
- package/src/version.js +0 -1
|
@@ -1,618 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import If from '../../utils/react-if';
|
|
5
|
-
import RulerDist from './rulerDist';
|
|
6
|
-
import convert from 'convert-units';
|
|
7
|
-
import { GeometryUtils } from '../../utils/export';
|
|
8
|
-
import {
|
|
9
|
-
MODE_ROTATING_ITEM,
|
|
10
|
-
SECONDARY_PURPLE_COLOR,
|
|
11
|
-
STATUS_NEGATIVE_COLOR,
|
|
12
|
-
BG_COLOR_1,
|
|
13
|
-
STATUS_WARNING_COLOR,
|
|
14
|
-
WALL_CABINET_LAYOUTPOS
|
|
15
|
-
} from '../../constants';
|
|
16
|
-
import { returnReplaceableDeepSearchType } from './utils';
|
|
17
|
-
const STYLE_LINE = {
|
|
18
|
-
fill: '#0096fd',
|
|
19
|
-
stroke: '#0096fd'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const STYLE_CIRCLE = {
|
|
23
|
-
fill: '#0096fd',
|
|
24
|
-
stroke: '#0096fd',
|
|
25
|
-
cursor: 'ew-resize'
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const STYLE_CIRCLE2 = {
|
|
29
|
-
fill: 'none',
|
|
30
|
-
stroke: '#0096fd',
|
|
31
|
-
cursor: 'ew-resize'
|
|
32
|
-
};
|
|
33
|
-
export default function Item(
|
|
34
|
-
{ layer, item, scene, catalog, mode },
|
|
35
|
-
{ itemsActions }
|
|
36
|
-
) {
|
|
37
|
-
let { x, y, rotation } = item;
|
|
38
|
-
let { showBaseCabinetMeasure, showWallCabinetMeasure } = scene;
|
|
39
|
-
let { vertices } = layer;
|
|
40
|
-
let layerID = scene.selectedLayer;
|
|
41
|
-
let element = catalog.getElement(item.type);
|
|
42
|
-
let allLines;
|
|
43
|
-
let curiteminfo;
|
|
44
|
-
let allLineRects;
|
|
45
|
-
let allItemRect;
|
|
46
|
-
let width, height;
|
|
47
|
-
const [clockRotateState, setClockRotateState] = useState(false);
|
|
48
|
-
const [antiClockRotateState, setAntiClockRotateState] = useState(false);
|
|
49
|
-
let val = {
|
|
50
|
-
pos: { x: item.x, y: item.y },
|
|
51
|
-
rotRad: (item.rotation / 180) * Math.PI
|
|
52
|
-
};
|
|
53
|
-
let tempWidth = item.properties.get('width');
|
|
54
|
-
let tempHeight = item.properties.get('depth');
|
|
55
|
-
if (tempWidth || tempHeight) {
|
|
56
|
-
width = convert(tempWidth.get('_length'))
|
|
57
|
-
.from(tempWidth.get('_unit'))
|
|
58
|
-
.to('cm');
|
|
59
|
-
height = convert(tempHeight.get('_length'))
|
|
60
|
-
.from(tempHeight.get('_unit'))
|
|
61
|
-
.to('cm');
|
|
62
|
-
} else {
|
|
63
|
-
width = convert(element.info.sizeinfo.width).from('in').to('cm');
|
|
64
|
-
height = convert(element.info.sizeinfo.depth).from('in').to('cm');
|
|
65
|
-
}
|
|
66
|
-
let angle = rotation + 90;
|
|
67
|
-
val.size = { width, height };
|
|
68
|
-
function point(x, y) {
|
|
69
|
-
return { x, y };
|
|
70
|
-
}
|
|
71
|
-
const buttons = [
|
|
72
|
-
{
|
|
73
|
-
name: 'Edit',
|
|
74
|
-
thumbnail: '/assets/img/svg/3d_item_warning_edit.svg'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: 'Info',
|
|
78
|
-
thumbnail: '/assets/img/svg/3d_item_warning_info.svg'
|
|
79
|
-
}
|
|
80
|
-
];
|
|
81
|
-
function getCalcRectFromItem(items) {
|
|
82
|
-
let x = items.pos.x;
|
|
83
|
-
let y = items.pos.y;
|
|
84
|
-
let w = items.size.width / 2;
|
|
85
|
-
let h = items.size.height / 2;
|
|
86
|
-
let rotRad = items.rotRad;
|
|
87
|
-
let mh = (3 * h) / 4;
|
|
88
|
-
let mx = x - w * Math.cos(rotRad) - mh * Math.sin(rotRad);
|
|
89
|
-
let my = y - w * Math.sin(rotRad) + mh * Math.cos(rotRad);
|
|
90
|
-
let m2x = x + w * Math.cos(rotRad) - mh * Math.sin(rotRad);
|
|
91
|
-
let m2y = y + w * Math.sin(rotRad) + mh * Math.cos(rotRad);
|
|
92
|
-
let m3x = x - h * Math.sin(rotRad);
|
|
93
|
-
let m3y = y + h * Math.cos(rotRad);
|
|
94
|
-
let m1x = x + h * Math.sin(rotRad);
|
|
95
|
-
let m1y = y - h * Math.cos(rotRad);
|
|
96
|
-
let x0 = mx + h * Math.sin(rotRad);
|
|
97
|
-
let y0 = my - h * Math.cos(rotRad);
|
|
98
|
-
let x3 = mx * 2 - x0;
|
|
99
|
-
let y3 = my * 2 - y0;
|
|
100
|
-
let x1 = x * 2 - x3;
|
|
101
|
-
let y1 = y * 2 - y3;
|
|
102
|
-
let x2 = x * 2 - x0;
|
|
103
|
-
let y2 = y * 2 - y0;
|
|
104
|
-
return {
|
|
105
|
-
rectCenterPoint: [
|
|
106
|
-
[point(mx, my), 180],
|
|
107
|
-
[point(m1x, m1y), -90],
|
|
108
|
-
[point(m2x, m2y), 0],
|
|
109
|
-
[point(m3x, m3y), 90]
|
|
110
|
-
]
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function getAllItems() {
|
|
115
|
-
let rectarray = [];
|
|
116
|
-
let currentItem;
|
|
117
|
-
let selectedItem;
|
|
118
|
-
|
|
119
|
-
if (layer.selected.items.size > 0) {
|
|
120
|
-
selectedItem = layer.getIn(['items', layer.selected.items.get(0)]);
|
|
121
|
-
let catid = selectedItem.type;
|
|
122
|
-
let cat = catalog.elements[catid];
|
|
123
|
-
if (!cat) cat = catalog.elements[returnReplaceableDeepSearchType(catid)];
|
|
124
|
-
if (cat === undefined || cat === null) {
|
|
125
|
-
cat = catalog.getIn(['elements', catid]);
|
|
126
|
-
if (!cat)
|
|
127
|
-
cat = catalog.getIn([
|
|
128
|
-
'elements',
|
|
129
|
-
returnReplaceableDeepSearchType(catid)
|
|
130
|
-
]);
|
|
131
|
-
}
|
|
132
|
-
currentItem = {
|
|
133
|
-
selectedItem,
|
|
134
|
-
cat
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
layer.items.forEach(item => {
|
|
139
|
-
let val = {
|
|
140
|
-
pos: { x: item.x, y: item.y },
|
|
141
|
-
rotRad: (item.rotation / 180) * Math.PI
|
|
142
|
-
};
|
|
143
|
-
let catid = item.type;
|
|
144
|
-
let cat = catalog.elements[catid];
|
|
145
|
-
if (!cat) cat = catalog.elements[returnReplaceableDeepSearchType(catid)];
|
|
146
|
-
let width = convert(item.properties.getIn(['width', '_length']))
|
|
147
|
-
.from('in')
|
|
148
|
-
.to('cm');
|
|
149
|
-
let height = convert(item.properties.getIn(['depth', '_length']))
|
|
150
|
-
.from('in')
|
|
151
|
-
.to('cm');
|
|
152
|
-
// let width = cat.info.sizeinfo.width;
|
|
153
|
-
// let height = cat.info.sizeinfo.depth;
|
|
154
|
-
val.size = { width, height };
|
|
155
|
-
let otherItem = {
|
|
156
|
-
item,
|
|
157
|
-
cat
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
// if (!GeometryUtils.needSnap(currentItem, otherItem)) {
|
|
161
|
-
// return;
|
|
162
|
-
// }
|
|
163
|
-
|
|
164
|
-
if (!item.selected) {
|
|
165
|
-
let x = val.pos.x;
|
|
166
|
-
let y = val.pos.y;
|
|
167
|
-
let rotRad = val.rotRad;
|
|
168
|
-
let w = val.size.width / 2;
|
|
169
|
-
let h = val.size.height / 2;
|
|
170
|
-
let mx = x - w * Math.cos(rotRad);
|
|
171
|
-
let my = y - w * Math.sin(rotRad);
|
|
172
|
-
let x0 = mx + h * Math.sin(rotRad);
|
|
173
|
-
let y0 = my - h * Math.cos(rotRad);
|
|
174
|
-
let x3 = mx * 2 - x0;
|
|
175
|
-
let y3 = my * 2 - y0;
|
|
176
|
-
let x1 = x * 2 - x3;
|
|
177
|
-
let y1 = y * 2 - y3;
|
|
178
|
-
let x2 = x * 2 - x0;
|
|
179
|
-
let y2 = y * 2 - y0;
|
|
180
|
-
rectarray.push({
|
|
181
|
-
rect: [point(x0, y0), point(x1, y1), point(x0, y0), point(x1, y1)]
|
|
182
|
-
});
|
|
183
|
-
rectarray.push({
|
|
184
|
-
rect: [point(x1, y1), point(x2, y2), point(x1, y1), point(x2, y2)]
|
|
185
|
-
});
|
|
186
|
-
rectarray.push({
|
|
187
|
-
rect: [point(x2, y2), point(x3, y3), point(x2, y2), point(x3, y3)]
|
|
188
|
-
});
|
|
189
|
-
rectarray.push({
|
|
190
|
-
rect: [point(x3, y3), point(x0, y0), point(x3, y3), point(x0, y0)]
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
// layer.holes.forEach(hole => {
|
|
196
|
-
// let val = {pos:{x:hole.x, y:hole.y}, rotRad:hole.rotation};
|
|
197
|
-
// let catid = hole.type;
|
|
198
|
-
// let cat = catalog.elements[catid];
|
|
199
|
-
// let width = hole.properties.getIn(['width']).getIn(['length']);
|
|
200
|
-
// let height = hole.properties.getIn(['height']).getIn(['length']);
|
|
201
|
-
// val.size = {width, height};
|
|
202
|
-
// let otherItem = {
|
|
203
|
-
// hole,
|
|
204
|
-
// cat
|
|
205
|
-
// }
|
|
206
|
-
|
|
207
|
-
// // if (!GeometryUtils.needSnap(currentItem, otherItem)) {
|
|
208
|
-
// // return;
|
|
209
|
-
// // }
|
|
210
|
-
|
|
211
|
-
// if (!hole.selected) {
|
|
212
|
-
// let x = val.pos.x;
|
|
213
|
-
// let y = val.pos.y;
|
|
214
|
-
// let rotRad = val.rotRad;
|
|
215
|
-
// let w = val.size.width / 2;
|
|
216
|
-
// let mx = x - w * Math.cos(rotRad);
|
|
217
|
-
// let my = y - w * Math.sin(rotRad);
|
|
218
|
-
// let kx = x + w * Math.cos(rotRad);
|
|
219
|
-
// let ky = y + w * Math.sin(rotRad);
|
|
220
|
-
// let x0 = mx - 10 * Math.sin(rotRad);
|
|
221
|
-
// let y0 = my + 10 * Math.cos(rotRad);
|
|
222
|
-
// let x3 = mx + 10 * Math.sin(rotRad);
|
|
223
|
-
// let y3 = my - 10 * Math.cos(rotRad);
|
|
224
|
-
// let x1 = kx - 10 * Math.sin(rotRad);
|
|
225
|
-
// let y1 = ky + 10 * Math.cos(rotRad);
|
|
226
|
-
// let x2 = kx + 10 * Math.sin(rotRad);
|
|
227
|
-
// let y2 = ky - 10 * Math.cos(rotRad);
|
|
228
|
-
// rectarray.push({'rect':[point(x0,y0), point(x1,y1) ,point(x0,y0), point(x1,y1)]});
|
|
229
|
-
// rectarray.push({'rect':[point(x1,y1), point(x2,y2), point(x1,y1), point(x2,y2)]}); // right
|
|
230
|
-
// rectarray.push({'rect':[point(x2,y2), point(x3,y3), point(x2,y2), point(x3,y3)]}); // front
|
|
231
|
-
// rectarray.push({'rect':[point(x3,y3), point(x0,y0), point(x3,y3), point(x0,y0)]}); // left
|
|
232
|
-
// }
|
|
233
|
-
// });
|
|
234
|
-
return { others: rectarray };
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
allItemRect = getAllItems();
|
|
238
|
-
allLines = GeometryUtils.getAllLines(layer);
|
|
239
|
-
allLineRects = GeometryUtils.buildRectFromLines(layer, allLines);
|
|
240
|
-
let allRect = allLineRects.concat(allItemRect.others);
|
|
241
|
-
curiteminfo = getCalcRectFromItem(val);
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
*
|
|
245
|
-
* @param x y position
|
|
246
|
-
* @param y x position
|
|
247
|
-
* @param rotRad item's rotation in radian
|
|
248
|
-
*/
|
|
249
|
-
let getDistant = (x, y, rotRad) => {
|
|
250
|
-
let center_h = (3 * height) / 8;
|
|
251
|
-
let center_x = x;
|
|
252
|
-
let center_y = y;
|
|
253
|
-
let center_x1 = x - center_h * Math.sin(rotRad);
|
|
254
|
-
let center_y1 = y + center_h * Math.cos(rotRad);
|
|
255
|
-
let PointArray = [];
|
|
256
|
-
curiteminfo.rectCenterPoint.forEach(centerpoint => {
|
|
257
|
-
let comparelength = [];
|
|
258
|
-
let a;
|
|
259
|
-
let RectLineFuction;
|
|
260
|
-
if (centerpoint[1] === 180 || centerpoint[1] === 0)
|
|
261
|
-
RectLineFuction = GeometryUtils.linePassingThroughTwoPoints(
|
|
262
|
-
centerpoint[0].x,
|
|
263
|
-
centerpoint[0].y,
|
|
264
|
-
center_x1,
|
|
265
|
-
center_y1
|
|
266
|
-
);
|
|
267
|
-
else
|
|
268
|
-
RectLineFuction = GeometryUtils.linePassingThroughTwoPoints(
|
|
269
|
-
centerpoint[0].x,
|
|
270
|
-
centerpoint[0].y,
|
|
271
|
-
center_x,
|
|
272
|
-
center_y
|
|
273
|
-
);
|
|
274
|
-
allRect.forEach(linerect => {
|
|
275
|
-
let p0 = GeometryUtils.clone_point(linerect.rect[2]);
|
|
276
|
-
let p1 = GeometryUtils.clone_point(linerect.rect[3]);
|
|
277
|
-
let lineFunction = {};
|
|
278
|
-
if (p0.x !== p1.x || p0.y !== p1.y)
|
|
279
|
-
lineFunction = GeometryUtils.linePassingThroughTwoPoints(
|
|
280
|
-
p0.x,
|
|
281
|
-
p0.y,
|
|
282
|
-
p1.x,
|
|
283
|
-
p1.y
|
|
284
|
-
);
|
|
285
|
-
let coordinatePoint = GeometryUtils.twoLinesIntersection(
|
|
286
|
-
lineFunction.a,
|
|
287
|
-
lineFunction.b,
|
|
288
|
-
lineFunction.c,
|
|
289
|
-
RectLineFuction.a,
|
|
290
|
-
RectLineFuction.b,
|
|
291
|
-
RectLineFuction.c
|
|
292
|
-
);
|
|
293
|
-
if (coordinatePoint !== undefined) {
|
|
294
|
-
if (
|
|
295
|
-
GeometryUtils.pointsDistance(p0.x, p0.y, p1.x, p1.y) >
|
|
296
|
-
GeometryUtils.pointsDistance(
|
|
297
|
-
p0.x,
|
|
298
|
-
p0.y,
|
|
299
|
-
coordinatePoint.x,
|
|
300
|
-
coordinatePoint.y
|
|
301
|
-
) &&
|
|
302
|
-
GeometryUtils.pointsDistance(p0.x, p0.y, p1.x, p1.y) >
|
|
303
|
-
GeometryUtils.pointsDistance(
|
|
304
|
-
p1.x,
|
|
305
|
-
p1.y,
|
|
306
|
-
coordinatePoint.x,
|
|
307
|
-
coordinatePoint.y
|
|
308
|
-
)
|
|
309
|
-
) {
|
|
310
|
-
if (
|
|
311
|
-
GeometryUtils.pointsDistance(
|
|
312
|
-
coordinatePoint.x,
|
|
313
|
-
coordinatePoint.y,
|
|
314
|
-
center_x,
|
|
315
|
-
center_y
|
|
316
|
-
) >
|
|
317
|
-
GeometryUtils.pointsDistance(
|
|
318
|
-
centerpoint[0].x,
|
|
319
|
-
centerpoint[0].y,
|
|
320
|
-
coordinatePoint.x,
|
|
321
|
-
coordinatePoint.y
|
|
322
|
-
)
|
|
323
|
-
) {
|
|
324
|
-
comparelength.push(
|
|
325
|
-
GeometryUtils.pointsDistance(
|
|
326
|
-
centerpoint[0].x,
|
|
327
|
-
centerpoint[0].y,
|
|
328
|
-
coordinatePoint.x,
|
|
329
|
-
coordinatePoint.y
|
|
330
|
-
)
|
|
331
|
-
);
|
|
332
|
-
a = Math.min.apply(null, comparelength);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
PointArray.push([a, centerpoint[1]]);
|
|
338
|
-
});
|
|
339
|
-
return { PointArray };
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
let nw = width / 2;
|
|
343
|
-
let nh = height / 2;
|
|
344
|
-
|
|
345
|
-
let { PointArray } = getDistant(x, y, val.rotRad);
|
|
346
|
-
PointArray.forEach((pointElement, index) => {
|
|
347
|
-
if (pointElement[0] == undefined) PointArray[index][0] = 0;
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
let renderedRuler = [];
|
|
351
|
-
let ep = 0.1;
|
|
352
|
-
if (item.selected) {
|
|
353
|
-
PointArray.forEach((element, key) => {
|
|
354
|
-
let itemDistanceFromLine = element[0];
|
|
355
|
-
let length = itemDistanceFromLine;
|
|
356
|
-
if (itemDistanceFromLine > ep || itemDistanceFromLine < -ep) {
|
|
357
|
-
renderedRuler.push(
|
|
358
|
-
<g
|
|
359
|
-
data-element-root
|
|
360
|
-
data-prototype="rulerDist"
|
|
361
|
-
data-id={item.id}
|
|
362
|
-
data-selected={item.selected}
|
|
363
|
-
data-layer={layer.id}
|
|
364
|
-
key={key}
|
|
365
|
-
data-length={length}
|
|
366
|
-
data-direct={element[1]}
|
|
367
|
-
>
|
|
368
|
-
<RulerDist
|
|
369
|
-
key={key}
|
|
370
|
-
layer={layer}
|
|
371
|
-
unit={scene.unit}
|
|
372
|
-
rulerUnit={scene.rulerUnit}
|
|
373
|
-
length={itemDistanceFromLine}
|
|
374
|
-
angle={rotation}
|
|
375
|
-
rotation={element[1]}
|
|
376
|
-
transform={`translate(${
|
|
377
|
-
element[1] === 180 ? -nw : element[1] === 0 ? nw : 0
|
|
378
|
-
}, ${
|
|
379
|
-
element[1] === 90 ? nh : element[1] === -90 ? -nh : (3 * nh) / 4
|
|
380
|
-
}) rotate(${element[1]}, 0, 0)`}
|
|
381
|
-
/>
|
|
382
|
-
</g>
|
|
383
|
-
);
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
let renderedItem = element.render2D.call(element, item, layer, scene);
|
|
389
|
-
let isSmall = false;
|
|
390
|
-
if (width < 40) isSmall = true;
|
|
391
|
-
let parts = [];
|
|
392
|
-
let warning_buttons = '';
|
|
393
|
-
let newWidth = item.toJS().properties.width.length;
|
|
394
|
-
if (
|
|
395
|
-
item.toJS().doorStyle.doorStyles &&
|
|
396
|
-
item.toJS().doorStyle.doorStyles.cds &&
|
|
397
|
-
item
|
|
398
|
-
.toJS()
|
|
399
|
-
.doorStyle.doorStyles.cds.filter(
|
|
400
|
-
cd => cd.itemID == item.getIn(['itemID'])
|
|
401
|
-
).length === 0 &&
|
|
402
|
-
item.category === 'cabinet'
|
|
403
|
-
)
|
|
404
|
-
warning_buttons = (
|
|
405
|
-
<g>
|
|
406
|
-
<g
|
|
407
|
-
id="warning_info_2d"
|
|
408
|
-
style={{ transform: `translate(0px,20px)`, cursor: 'pointer' }}
|
|
409
|
-
onMouseEnter={event => {
|
|
410
|
-
let bbox = event.target.getBoundingClientRect();
|
|
411
|
-
document.getElementById('warning_box_2d').style.display = 'flex';
|
|
412
|
-
document.getElementById('warning_box_2d').style.top = `${
|
|
413
|
-
bbox.top - 60
|
|
414
|
-
}px`;
|
|
415
|
-
document.getElementById('warning_box_2d').style.left =
|
|
416
|
-
`${bbox.left}px`;
|
|
417
|
-
}}
|
|
418
|
-
onMouseLeave={() => {
|
|
419
|
-
document.getElementById('warning_box_2d').style.display = 'none';
|
|
420
|
-
}}
|
|
421
|
-
>
|
|
422
|
-
<circle cx={0} cy={0} r={8} fill="white" />
|
|
423
|
-
<image
|
|
424
|
-
width={15}
|
|
425
|
-
height={15}
|
|
426
|
-
x={-7.5}
|
|
427
|
-
y={-7.5}
|
|
428
|
-
style={{ transform: `rotate(${180 - item.rotation}deg)` }}
|
|
429
|
-
href={buttons[1].thumbnail}
|
|
430
|
-
/>
|
|
431
|
-
</g>
|
|
432
|
-
<g
|
|
433
|
-
style={{ cursor: 'pointer' }}
|
|
434
|
-
data-element-root
|
|
435
|
-
data-prototype={item.prototype}
|
|
436
|
-
data-id={item.id}
|
|
437
|
-
data-selected={item.selected}
|
|
438
|
-
data-layer={layer.id}
|
|
439
|
-
data-part="warning_edit"
|
|
440
|
-
>
|
|
441
|
-
<circle cx={0} cy={0} r={8} fill="white" />
|
|
442
|
-
<image
|
|
443
|
-
width={15}
|
|
444
|
-
height={15}
|
|
445
|
-
x={-7.5}
|
|
446
|
-
y={-7.5}
|
|
447
|
-
style={{ transform: `rotate(${90 - item.rotation}deg)` }}
|
|
448
|
-
href={buttons[0].thumbnail}
|
|
449
|
-
/>
|
|
450
|
-
</g>
|
|
451
|
-
</g>
|
|
452
|
-
);
|
|
453
|
-
|
|
454
|
-
if (item.selected)
|
|
455
|
-
parts = [
|
|
456
|
-
<g
|
|
457
|
-
key={0}
|
|
458
|
-
data-element-root
|
|
459
|
-
data-prototype={item.prototype}
|
|
460
|
-
data-id={item.id}
|
|
461
|
-
data-selected={item.selected}
|
|
462
|
-
data-layer={layer.id}
|
|
463
|
-
data-part="rotation-anchor"
|
|
464
|
-
style={{ cursor: 'w-resize' }}
|
|
465
|
-
>
|
|
466
|
-
<image
|
|
467
|
-
href={
|
|
468
|
-
clockRotateState
|
|
469
|
-
? '/assets/img/svg/rotate.png'
|
|
470
|
-
: '/assets/img/svg/blank_div.svg'
|
|
471
|
-
}
|
|
472
|
-
style={{
|
|
473
|
-
transform: `scale(-1, -1) translate(${width / 2}px, ${
|
|
474
|
-
height / 2
|
|
475
|
-
}px) rotate(25deg)`
|
|
476
|
-
}}
|
|
477
|
-
height="20"
|
|
478
|
-
width="20"
|
|
479
|
-
onMouseEnter={() => {
|
|
480
|
-
setClockRotateState(true);
|
|
481
|
-
setAntiClockRotateState(false);
|
|
482
|
-
}}
|
|
483
|
-
onMouseLeave={() =>
|
|
484
|
-
setClockRotateState(mode === MODE_ROTATING_ITEM ? true : false)
|
|
485
|
-
}
|
|
486
|
-
/>
|
|
487
|
-
<image
|
|
488
|
-
href={
|
|
489
|
-
antiClockRotateState
|
|
490
|
-
? '/assets/img/svg/rotate.png'
|
|
491
|
-
: '/assets/img/svg/blank_div.svg'
|
|
492
|
-
}
|
|
493
|
-
style={{
|
|
494
|
-
transform: `scale(1, -1) translate(${width / 2}px, ${
|
|
495
|
-
height / 2
|
|
496
|
-
}px) rotate(25deg)`
|
|
497
|
-
}}
|
|
498
|
-
height="20"
|
|
499
|
-
width="20"
|
|
500
|
-
onMouseEnter={() => {
|
|
501
|
-
setAntiClockRotateState(true);
|
|
502
|
-
setClockRotateState(false);
|
|
503
|
-
}}
|
|
504
|
-
onMouseLeave={() =>
|
|
505
|
-
setAntiClockRotateState(mode === MODE_ROTATING_ITEM ? true : false)
|
|
506
|
-
}
|
|
507
|
-
/>
|
|
508
|
-
</g>,
|
|
509
|
-
<g
|
|
510
|
-
key={1}
|
|
511
|
-
// transform={`translate(${-width / 2 - (!isSmall ? 40 : 0)},${height / 2 + 40})`}
|
|
512
|
-
style={{
|
|
513
|
-
cursor: 'pointer',
|
|
514
|
-
transform: `rotate(${360 - item.rotation}deg) translate(${
|
|
515
|
-
-width / 2 - 27
|
|
516
|
-
}px, ${0}px)`
|
|
517
|
-
}}
|
|
518
|
-
data-element-root
|
|
519
|
-
data-prototype={item.prototype}
|
|
520
|
-
data-id={item.id}
|
|
521
|
-
data-selected={item.selected}
|
|
522
|
-
data-layer={layer.id}
|
|
523
|
-
data-part="duplicate"
|
|
524
|
-
>
|
|
525
|
-
<defs>
|
|
526
|
-
<filter id="shadow">
|
|
527
|
-
<feDropShadow dx="0" dy="0" stdDeviation="0.6"></feDropShadow>
|
|
528
|
-
</filter>
|
|
529
|
-
</defs>
|
|
530
|
-
<rect
|
|
531
|
-
rx="4"
|
|
532
|
-
ry="4"
|
|
533
|
-
height="22"
|
|
534
|
-
width="22"
|
|
535
|
-
fill="white"
|
|
536
|
-
filter="url(#shadow)"
|
|
537
|
-
/>
|
|
538
|
-
<image
|
|
539
|
-
href="/assets/img/svg/duplicate.svg"
|
|
540
|
-
x="3"
|
|
541
|
-
y="-19"
|
|
542
|
-
height="16"
|
|
543
|
-
width="16"
|
|
544
|
-
style={{ transform: 'rotateX(180deg)' }}
|
|
545
|
-
/>
|
|
546
|
-
</g>,
|
|
547
|
-
<g
|
|
548
|
-
key={2}
|
|
549
|
-
// transform={`translate(${-width / 2 - (!isSmall ? 40 : 0)},${height / 2})`}
|
|
550
|
-
style={{
|
|
551
|
-
cursor: 'pointer',
|
|
552
|
-
transform: `rotate(${360 - item.rotation}deg) translate(${
|
|
553
|
-
-width / 2 - 27
|
|
554
|
-
}px, ${-27}px)`
|
|
555
|
-
}}
|
|
556
|
-
data-element-root
|
|
557
|
-
data-prototype={item.prototype}
|
|
558
|
-
data-id={item.id}
|
|
559
|
-
data-selected={item.selected}
|
|
560
|
-
data-layer={layer.id}
|
|
561
|
-
data-part="remove"
|
|
562
|
-
>
|
|
563
|
-
<rect
|
|
564
|
-
rx="4"
|
|
565
|
-
ry="4"
|
|
566
|
-
height="22"
|
|
567
|
-
width="22"
|
|
568
|
-
fill="white"
|
|
569
|
-
filter="url(#shadow)"
|
|
570
|
-
/>
|
|
571
|
-
<image
|
|
572
|
-
href="/assets/img/svg/delete.svg"
|
|
573
|
-
x="3"
|
|
574
|
-
y="-19"
|
|
575
|
-
height="16"
|
|
576
|
-
width="16"
|
|
577
|
-
style={{ transform: 'rotateX(180deg)' }}
|
|
578
|
-
/>
|
|
579
|
-
</g>
|
|
580
|
-
];
|
|
581
|
-
let measure =
|
|
582
|
-
item.layoutpos === WALL_CABINET_LAYOUTPOS
|
|
583
|
-
? showWallCabinetMeasure
|
|
584
|
-
: showBaseCabinetMeasure;
|
|
585
|
-
|
|
586
|
-
return (
|
|
587
|
-
<g
|
|
588
|
-
data-element-root
|
|
589
|
-
data-prototype={item.prototype}
|
|
590
|
-
data-id={item.id}
|
|
591
|
-
data-selected={item.selected}
|
|
592
|
-
data-layer={layer.id}
|
|
593
|
-
style={item.selected ? { cursor: 'move' } : {}}
|
|
594
|
-
>
|
|
595
|
-
{renderedItem}
|
|
596
|
-
<g
|
|
597
|
-
transform={`translate(${x},${y}) rotate(${rotation})`}
|
|
598
|
-
style={{ cursor: 'initial' }}
|
|
599
|
-
>
|
|
600
|
-
{measure ? renderedRuler : null}
|
|
601
|
-
|
|
602
|
-
{parts}
|
|
603
|
-
{warning_buttons}
|
|
604
|
-
</g>
|
|
605
|
-
</g>
|
|
606
|
-
);
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
Item.propTypes = {
|
|
610
|
-
item: PropTypes.object.isRequired,
|
|
611
|
-
layer: PropTypes.object.isRequired,
|
|
612
|
-
scene: PropTypes.object.isRequired,
|
|
613
|
-
catalog: PropTypes.object.isRequired
|
|
614
|
-
};
|
|
615
|
-
|
|
616
|
-
Item.contextTypes = {
|
|
617
|
-
itemsActions: PropTypes.object.isRequired
|
|
618
|
-
};
|