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,136 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import convert from 'convert-units';
|
|
4
|
-
import IDBroker from '../../utils/id-broker';
|
|
5
|
-
import { FormNumberInput2 } from '../style/export';
|
|
6
|
-
import {
|
|
7
|
-
LINE_THICKNESS,
|
|
8
|
-
SHADE_LIGHT_BLUE_COLOR,
|
|
9
|
-
TEXT_COLOR_NEUTRAL_7
|
|
10
|
-
} from '../../constants';
|
|
11
|
-
|
|
12
|
-
const STYLE = {
|
|
13
|
-
stroke: TEXT_COLOR_NEUTRAL_7,
|
|
14
|
-
strokeWidth: '1px'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const BACKGROUNDSTYLE = {
|
|
18
|
-
fill: 'transparent',
|
|
19
|
-
fillOpacity: 0.8
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const STYLE_TEXT = {
|
|
23
|
-
textAnchor: 'middle',
|
|
24
|
-
fontSize: '12px',
|
|
25
|
-
pointerEvents: 'none',
|
|
26
|
-
|
|
27
|
-
//http://stackoverflow.com/questions/826782/how-to-disable-text-selection-highlighting-using-css
|
|
28
|
-
WebkitTouchCallout: 'none' /* iOS Safari */,
|
|
29
|
-
WebkitUserSelect: 'none' /* Chrome/Safari/Opera */,
|
|
30
|
-
MozUserSelect: 'none' /* Firefox */,
|
|
31
|
-
MsUserSelect: 'none' /* Internet Explorer/Edge */,
|
|
32
|
-
userSelect: 'none'
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default function Ruler({
|
|
36
|
-
layer,
|
|
37
|
-
length,
|
|
38
|
-
unit,
|
|
39
|
-
rulerUnit,
|
|
40
|
-
transform,
|
|
41
|
-
flag
|
|
42
|
-
}) {
|
|
43
|
-
let update = (lengthInput, unitInput, type) => {
|
|
44
|
-
let newLength = toFixedFloat(lengthInput);
|
|
45
|
-
let merged = null;
|
|
46
|
-
if (type === 0) {
|
|
47
|
-
merged = value.merge({
|
|
48
|
-
_length: newLength,
|
|
49
|
-
length: convert(newLength).from(unitInput).to('cm')
|
|
50
|
-
});
|
|
51
|
-
} else {
|
|
52
|
-
merged = value.merge({
|
|
53
|
-
_length: convert(newLength).from(UNIT_INCH).to(unitInput),
|
|
54
|
-
_unit: unitInput
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
// if (hook) {
|
|
58
|
-
// return hook(merged, sourceElement, internalState, state).then(val => {
|
|
59
|
-
// return onUpdate(val);
|
|
60
|
-
// });
|
|
61
|
-
// }
|
|
62
|
-
// return onUpdate(merged);
|
|
63
|
-
};
|
|
64
|
-
// let _unit = "in";
|
|
65
|
-
// let distanceText = convert(length).from(unit).to(rulerUnit);
|
|
66
|
-
let distanceText = convert(length).from(unit).to(rulerUnit).toFixed(0);
|
|
67
|
-
const thickness = convert(LINE_THICKNESS).from(unit).to(rulerUnit).toFixed(0);
|
|
68
|
-
// let _ft_len = convert(_length).from('in').to('ft');
|
|
69
|
-
// let _ft_val = Math.floor(_ft_len); _ft_len -= _ft_val;
|
|
70
|
-
// let _in_val = convert(_ft_len).from('ft').to('in').toFixed(0);
|
|
71
|
-
// let distanceText = `${_ft_val}'${_in_val}"`;
|
|
72
|
-
let textLength = (distanceText.length + layer.unit.length) * 18;
|
|
73
|
-
return (
|
|
74
|
-
<g transform={transform}>
|
|
75
|
-
<g id="ruler">
|
|
76
|
-
<rect
|
|
77
|
-
id={`ruler_rect_${IDBroker.acquireID()}`}
|
|
78
|
-
style={BACKGROUNDSTYLE}
|
|
79
|
-
x={length / 2 - textLength / 2}
|
|
80
|
-
y="-10"
|
|
81
|
-
width={textLength}
|
|
82
|
-
height="22"
|
|
83
|
-
rx="1"
|
|
84
|
-
ry="0.39"
|
|
85
|
-
/>
|
|
86
|
-
<text
|
|
87
|
-
x={length / 2}
|
|
88
|
-
y="3"
|
|
89
|
-
transform={`scale(1, -1)`}
|
|
90
|
-
style={STYLE_TEXT}
|
|
91
|
-
fill={TEXT_COLOR_NEUTRAL_7}
|
|
92
|
-
>
|
|
93
|
-
{Math.round(convert(distanceText).from('in').to(layer.unit) * 100) /
|
|
94
|
-
100}
|
|
95
|
-
{layer.unit === 'in' ? '"' : layer.unit}
|
|
96
|
-
</text>
|
|
97
|
-
{/* <FormNumberInput2
|
|
98
|
-
value={distanceText}
|
|
99
|
-
onChange={event => update(event.target.value, _unit, 0)}
|
|
100
|
-
style={{
|
|
101
|
-
width: textLength,
|
|
102
|
-
}}
|
|
103
|
-
precision={2}
|
|
104
|
-
/> */}
|
|
105
|
-
</g>
|
|
106
|
-
{/* <line x1="-4" y1="-4" x2="4" y2="4" style={STYLE} /> */}
|
|
107
|
-
{/* <line x1={length - 4} y1="-4" x2={length + 4} y2="4" style={STYLE} /> */}
|
|
108
|
-
<line
|
|
109
|
-
x1="0"
|
|
110
|
-
y1="0"
|
|
111
|
-
x2={(length - textLength) / 2 < 0 ? 0 : (length - textLength) / 2}
|
|
112
|
-
y2="0"
|
|
113
|
-
style={STYLE}
|
|
114
|
-
/>
|
|
115
|
-
<line
|
|
116
|
-
x1={
|
|
117
|
-
(length + textLength) / 2 < 0
|
|
118
|
-
? 0
|
|
119
|
-
: (length + textLength) / 2 < length
|
|
120
|
-
? (length + textLength) / 2
|
|
121
|
-
: length
|
|
122
|
-
}
|
|
123
|
-
y1="0"
|
|
124
|
-
x2={length}
|
|
125
|
-
y2="0"
|
|
126
|
-
style={STYLE}
|
|
127
|
-
/>
|
|
128
|
-
</g>
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
Ruler.propTypes = {
|
|
133
|
-
length: PropTypes.number.isRequired,
|
|
134
|
-
unit: PropTypes.string.isRequired,
|
|
135
|
-
transform: PropTypes.string.isRequired
|
|
136
|
-
};
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import convert from 'convert-units';
|
|
4
|
-
|
|
5
|
-
const ARROW_STYLE = {
|
|
6
|
-
stroke: '#1183B7',
|
|
7
|
-
strokeWidth: '2px',
|
|
8
|
-
strokeLinecap: 'round'
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const STYLE = {
|
|
12
|
-
stroke: 'black',
|
|
13
|
-
strokeWidth: '1.1px'
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const STYLE_TEXT = {
|
|
17
|
-
textAnchor: 'middle',
|
|
18
|
-
fontSize: '10px',
|
|
19
|
-
pointerEvents: 'none',
|
|
20
|
-
|
|
21
|
-
//http://stackoverflow.com/questions/826782/how-to-disable-text-selection-highlighting-using-css
|
|
22
|
-
WebkitTouchCallout: 'none' /* iOS Safari */,
|
|
23
|
-
WebkitUserSelect: 'none' /* Chrome/Safari/Opera */,
|
|
24
|
-
MozUserSelect: 'none' /* Firefox */,
|
|
25
|
-
MsUserSelect: 'none' /* Internet Explorer/Edge */,
|
|
26
|
-
userSelect: 'none'
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default function RulerDist({
|
|
30
|
-
layer,
|
|
31
|
-
length,
|
|
32
|
-
unit,
|
|
33
|
-
rulerUnit,
|
|
34
|
-
transform,
|
|
35
|
-
angle,
|
|
36
|
-
rotation
|
|
37
|
-
}) {
|
|
38
|
-
let _unit = 'in';
|
|
39
|
-
// let _length = convert(length).from(unit).to(rulerUnit);
|
|
40
|
-
let distanceText = `${convert(length).from('cm').to(rulerUnit).toFixed(0)}`;
|
|
41
|
-
let textLength = (distanceText.length + layer.unit.length) * 18;
|
|
42
|
-
let textangle = angle + 90;
|
|
43
|
-
let textRotation = 1;
|
|
44
|
-
let ay = 2;
|
|
45
|
-
let ep = Math.sin((textangle * Math.PI) / 180);
|
|
46
|
-
let es = Math.sin((angle * Math.PI) / 180);
|
|
47
|
-
|
|
48
|
-
if (rotation === 180 && ep >= 0) {
|
|
49
|
-
textRotation = 180;
|
|
50
|
-
ay = 5;
|
|
51
|
-
} else if (rotation === 180 && ep <= 0) {
|
|
52
|
-
textRotation = 0;
|
|
53
|
-
ay = -3;
|
|
54
|
-
} else if (rotation === 0 && ep >= 0) {
|
|
55
|
-
textRotation = 0;
|
|
56
|
-
ay = -3;
|
|
57
|
-
} else if (rotation === 0 && ep <= 0) {
|
|
58
|
-
textRotation = 180;
|
|
59
|
-
ay = 5;
|
|
60
|
-
}
|
|
61
|
-
if (rotation === 90 && es >= 0) {
|
|
62
|
-
textRotation = 180;
|
|
63
|
-
ay = 5;
|
|
64
|
-
} else if (rotation === 90 && es <= 0) {
|
|
65
|
-
textRotation = 0;
|
|
66
|
-
ay = -3;
|
|
67
|
-
} else if (rotation === -90 && es >= 0) {
|
|
68
|
-
textRotation = 0;
|
|
69
|
-
ay = -3;
|
|
70
|
-
} else if (rotation === -90 && es <= 0) {
|
|
71
|
-
textRotation = 180;
|
|
72
|
-
ay = 5;
|
|
73
|
-
}
|
|
74
|
-
if (Math.abs(length - textLength) / 2 <= 16) {
|
|
75
|
-
let dy = textRotation == 0 ? 15 : -15;
|
|
76
|
-
return (
|
|
77
|
-
<g transform={transform}>
|
|
78
|
-
<g transform={`translate(0, ${dy})`}>
|
|
79
|
-
<text
|
|
80
|
-
x="0"
|
|
81
|
-
y="0"
|
|
82
|
-
transform={`translate(${
|
|
83
|
-
length / 2
|
|
84
|
-
},${ay}) scale(1, -1) rotate(${textRotation})`}
|
|
85
|
-
style={STYLE_TEXT}
|
|
86
|
-
>
|
|
87
|
-
{Math.round(convert(distanceText).from('in').to(layer.unit) * 100) /
|
|
88
|
-
100}
|
|
89
|
-
{layer.unit}
|
|
90
|
-
</text>
|
|
91
|
-
</g>
|
|
92
|
-
<circle
|
|
93
|
-
cx="1"
|
|
94
|
-
cy="0"
|
|
95
|
-
fill="white"
|
|
96
|
-
r="1.1"
|
|
97
|
-
stroke="black"
|
|
98
|
-
strokeWidth="0.6"
|
|
99
|
-
/>
|
|
100
|
-
<line
|
|
101
|
-
x1="2"
|
|
102
|
-
y1="0"
|
|
103
|
-
x2={(length - textLength) / 2 < 0 ? 0 : length}
|
|
104
|
-
y2="0"
|
|
105
|
-
style={STYLE}
|
|
106
|
-
/>
|
|
107
|
-
<line
|
|
108
|
-
x1={
|
|
109
|
-
(length + textLength) / 2 < 0
|
|
110
|
-
? 0
|
|
111
|
-
: (length + textLength) / 2 < length
|
|
112
|
-
? (length + textLength) / 2
|
|
113
|
-
: length
|
|
114
|
-
}
|
|
115
|
-
y1="0"
|
|
116
|
-
x2={length}
|
|
117
|
-
y2="0"
|
|
118
|
-
style={STYLE}
|
|
119
|
-
/>
|
|
120
|
-
<circle
|
|
121
|
-
cx={length - 1}
|
|
122
|
-
cy="0"
|
|
123
|
-
fill="white"
|
|
124
|
-
r="1.1"
|
|
125
|
-
stroke="black"
|
|
126
|
-
strokeWidth="0.6"
|
|
127
|
-
/>
|
|
128
|
-
</g>
|
|
129
|
-
);
|
|
130
|
-
} else {
|
|
131
|
-
return (
|
|
132
|
-
<g transform={transform}>
|
|
133
|
-
<g>
|
|
134
|
-
<text
|
|
135
|
-
x="0"
|
|
136
|
-
y="0"
|
|
137
|
-
transform={`translate(${
|
|
138
|
-
length / 2
|
|
139
|
-
},${ay}) scale(1, -1) rotate(${textRotation})`}
|
|
140
|
-
style={STYLE_TEXT}
|
|
141
|
-
>
|
|
142
|
-
{Math.round(convert(distanceText).from('in').to(layer.unit) * 100) /
|
|
143
|
-
100}
|
|
144
|
-
{layer.unit}
|
|
145
|
-
</text>
|
|
146
|
-
</g>
|
|
147
|
-
<circle
|
|
148
|
-
cx="1"
|
|
149
|
-
cy="0"
|
|
150
|
-
fill="white"
|
|
151
|
-
r="1.1"
|
|
152
|
-
stroke="black"
|
|
153
|
-
strokeWidth="0.6"
|
|
154
|
-
/>
|
|
155
|
-
<line
|
|
156
|
-
x1="2"
|
|
157
|
-
y1="0"
|
|
158
|
-
x2={(length - textLength) / 2 < 0 ? 0 : (length - textLength) / 2}
|
|
159
|
-
y2="0"
|
|
160
|
-
style={STYLE}
|
|
161
|
-
/>
|
|
162
|
-
<line
|
|
163
|
-
x1={
|
|
164
|
-
(length + textLength) / 2 < 0
|
|
165
|
-
? 0
|
|
166
|
-
: (length + textLength) / 2 < length
|
|
167
|
-
? (length + textLength) / 2
|
|
168
|
-
: length
|
|
169
|
-
}
|
|
170
|
-
y1="0"
|
|
171
|
-
x2={length}
|
|
172
|
-
y2="0"
|
|
173
|
-
style={STYLE}
|
|
174
|
-
/>
|
|
175
|
-
<circle
|
|
176
|
-
cx={length - 1}
|
|
177
|
-
cy="0"
|
|
178
|
-
fill="white"
|
|
179
|
-
r="1.1"
|
|
180
|
-
stroke="black"
|
|
181
|
-
strokeWidth="0.6"
|
|
182
|
-
/>
|
|
183
|
-
</g>
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
RulerDist.propTypes = {
|
|
189
|
-
length: PropTypes.number.isRequired,
|
|
190
|
-
unit: PropTypes.string.isRequired,
|
|
191
|
-
transform: PropTypes.string.isRequired
|
|
192
|
-
};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import * as SharedStyle from '../../shared-style';
|
|
4
|
-
|
|
5
|
-
export default class RulerX extends Component {
|
|
6
|
-
constructor(props, context) {
|
|
7
|
-
super(props, context);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
render() {
|
|
11
|
-
let elementW = this.props.unitPixelSize * this.props.zoom;
|
|
12
|
-
|
|
13
|
-
let elementStyle = {
|
|
14
|
-
display: 'inline-block',
|
|
15
|
-
width: elementW,
|
|
16
|
-
position: 'relative',
|
|
17
|
-
borderLeft: '1px solid ' + this.props.fontColor,
|
|
18
|
-
paddingLeft: '0.2em',
|
|
19
|
-
fontSize: '10px',
|
|
20
|
-
height: '100%'
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
let insideElementsStyle = {
|
|
24
|
-
width: '20%',
|
|
25
|
-
display: 'inline-block',
|
|
26
|
-
margin: 0,
|
|
27
|
-
padding: 0
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
let rulerStyle = {
|
|
31
|
-
backgroundColor: this.props.backgroundColor,
|
|
32
|
-
position: 'relative',
|
|
33
|
-
width: this.props.width,
|
|
34
|
-
height: '100%',
|
|
35
|
-
color: this.props.fontColor
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
let markerStyle = {
|
|
39
|
-
position: 'absolute',
|
|
40
|
-
left:
|
|
41
|
-
this.props.zeroLeftPosition + this.props.mouseX * this.props.zoom - 6.5,
|
|
42
|
-
top: 8,
|
|
43
|
-
width: 0,
|
|
44
|
-
height: 0,
|
|
45
|
-
borderLeft: '5px solid transparent',
|
|
46
|
-
borderRight: '5px solid transparent',
|
|
47
|
-
borderTop: '8px solid ' + this.props.markerColor,
|
|
48
|
-
zIndex: 9001
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
let rulerContainer = {
|
|
52
|
-
position: 'absolute',
|
|
53
|
-
height: '10px',
|
|
54
|
-
top: '4px',
|
|
55
|
-
display: 'grid',
|
|
56
|
-
gridRowGap: '0',
|
|
57
|
-
gridColumnGap: '0',
|
|
58
|
-
gridTemplateRows: '100%',
|
|
59
|
-
grdAutoColumns: `${elementW}px`
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
let positiveRulerContainer = {
|
|
63
|
-
...rulerContainer,
|
|
64
|
-
width: this.props.positiveUnitsNumber * elementW,
|
|
65
|
-
left: this.props.zeroLeftPosition
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
let negativeRulerContainer = {
|
|
69
|
-
...rulerContainer,
|
|
70
|
-
width: this.props.negativeUnitsNumber * elementW,
|
|
71
|
-
left:
|
|
72
|
-
this.props.zeroLeftPosition - this.props.negativeUnitsNumber * elementW
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
let positiveDomElements = [];
|
|
76
|
-
|
|
77
|
-
if (elementW <= 200) {
|
|
78
|
-
for (let x = 0; x < this.props.positiveUnitsNumber; x++) {
|
|
79
|
-
positiveDomElements.push(
|
|
80
|
-
<div
|
|
81
|
-
key={x}
|
|
82
|
-
style={{ ...elementStyle, gridColumn: x + 1, gridRow: 1 }}
|
|
83
|
-
>
|
|
84
|
-
{elementW > 30 ? x * 100 : ''}
|
|
85
|
-
</div>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
} else if (elementW > 200) {
|
|
89
|
-
for (let x = 0; x < this.props.positiveUnitsNumber; x++) {
|
|
90
|
-
let val = x * 100;
|
|
91
|
-
positiveDomElements.push(
|
|
92
|
-
<div
|
|
93
|
-
key={x}
|
|
94
|
-
style={{ ...elementStyle, gridColumn: x + 1, gridRow: 1 }}
|
|
95
|
-
>
|
|
96
|
-
<div style={insideElementsStyle}>{val}</div>
|
|
97
|
-
<div style={insideElementsStyle}>{val + 1 * 20}</div>
|
|
98
|
-
<div style={insideElementsStyle}>{val + 2 * 20}</div>
|
|
99
|
-
<div style={insideElementsStyle}>{val + 3 * 20}</div>
|
|
100
|
-
<div style={insideElementsStyle}>{val + 4 * 20}</div>
|
|
101
|
-
</div>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return (
|
|
107
|
-
<div style={rulerStyle}>
|
|
108
|
-
<div id="horizontalMarker" style={markerStyle}></div>
|
|
109
|
-
<div id="negativeRuler" style={negativeRulerContainer}></div>
|
|
110
|
-
<div id="positiveRuler" style={positiveRulerContainer}>
|
|
111
|
-
{positiveDomElements}
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
RulerX.propTypes = {
|
|
119
|
-
unitPixelSize: PropTypes.number.isRequired,
|
|
120
|
-
positiveUnitsNumber: PropTypes.number,
|
|
121
|
-
negativeUnitsNumber: PropTypes.number,
|
|
122
|
-
zoom: PropTypes.number.isRequired,
|
|
123
|
-
mouseX: PropTypes.number.isRequired,
|
|
124
|
-
width: PropTypes.number.isRequired,
|
|
125
|
-
zeroLeftPosition: PropTypes.number.isRequired,
|
|
126
|
-
backgroundColor: PropTypes.string,
|
|
127
|
-
fontColor: PropTypes.string,
|
|
128
|
-
markerColor: PropTypes.string
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
RulerX.defaultProps = {
|
|
132
|
-
positiveUnitsNumber: 50,
|
|
133
|
-
negativeUnitsNumber: 50,
|
|
134
|
-
backgroundColor: SharedStyle.PRIMARY_COLOR.main,
|
|
135
|
-
fontColor: SharedStyle.COLORS.white,
|
|
136
|
-
markerColor: SharedStyle.SECONDARY_COLOR.main
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
RulerX.contextTypes = {
|
|
140
|
-
translator: PropTypes.object.isRequired
|
|
141
|
-
};
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import * as SharedStyle from '../../shared-style';
|
|
4
|
-
|
|
5
|
-
export default class RulerY extends Component {
|
|
6
|
-
constructor(props, context) {
|
|
7
|
-
super(props, context);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
render() {
|
|
11
|
-
let elementH = this.props.unitPixelSize * this.props.zoom;
|
|
12
|
-
|
|
13
|
-
let elementStyle = {
|
|
14
|
-
width: '8px',
|
|
15
|
-
borderBottom: '1px solid ' + this.props.fontColor,
|
|
16
|
-
paddingBottom: '0.2em',
|
|
17
|
-
fontSize: '10px',
|
|
18
|
-
height: elementH,
|
|
19
|
-
textOrientation: 'upright',
|
|
20
|
-
writingMode: 'vertical-lr',
|
|
21
|
-
letterSpacing: '-2px',
|
|
22
|
-
textAlign: 'right'
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
let insideElementsStyle = {
|
|
26
|
-
height: '20%',
|
|
27
|
-
width: '100%',
|
|
28
|
-
textOrientation: 'upright',
|
|
29
|
-
writingMode: 'vertical-lr',
|
|
30
|
-
display: 'inline-block',
|
|
31
|
-
letterSpacing: '-2px',
|
|
32
|
-
textAlign: 'right'
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
let rulerStyle = {
|
|
36
|
-
backgroundColor: this.props.backgroundColor,
|
|
37
|
-
height: this.props.height,
|
|
38
|
-
width: '100%',
|
|
39
|
-
color: this.props.fontColor
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
let markerStyle = {
|
|
43
|
-
position: 'absolute',
|
|
44
|
-
top:
|
|
45
|
-
this.props.zeroTopPosition - this.props.mouseY * this.props.zoom - 6.5,
|
|
46
|
-
left: 8,
|
|
47
|
-
width: 0,
|
|
48
|
-
height: 0,
|
|
49
|
-
borderTop: '5px solid transparent',
|
|
50
|
-
borderBottom: '5px solid transparent',
|
|
51
|
-
borderLeft: '8px solid ' + this.props.markerColor,
|
|
52
|
-
zIndex: 9001
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
let rulerContainer = {
|
|
56
|
-
position: 'absolute',
|
|
57
|
-
width: '100%',
|
|
58
|
-
display: 'grid',
|
|
59
|
-
gridRowGap: '0',
|
|
60
|
-
gridColumnGap: '0',
|
|
61
|
-
gridTemplateColumns: '100%',
|
|
62
|
-
grdAutoRows: `${elementH}px`,
|
|
63
|
-
paddingLeft: '5px'
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
let positiveRulerContainer = {
|
|
67
|
-
...rulerContainer,
|
|
68
|
-
top:
|
|
69
|
-
this.props.zeroTopPosition - this.props.positiveUnitsNumber * elementH,
|
|
70
|
-
height: this.props.positiveUnitsNumber * elementH
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
let negativeRulerContainer = {
|
|
74
|
-
...rulerContainer,
|
|
75
|
-
top:
|
|
76
|
-
this.props.zeroTopPosition + this.props.negativeUnitsNumber * elementH,
|
|
77
|
-
height: this.props.negativeUnitsNumber * elementH
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
let positiveDomElements = [];
|
|
81
|
-
|
|
82
|
-
if (elementH <= 200) {
|
|
83
|
-
for (let x = 1; x <= this.props.positiveUnitsNumber; x++) {
|
|
84
|
-
positiveDomElements.push(
|
|
85
|
-
<div key={x} style={{ ...elementStyle, gridColumn: 1, gridRow: x }}>
|
|
86
|
-
{elementH > 30 ? (this.props.positiveUnitsNumber - x) * 100 : ''}
|
|
87
|
-
</div>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
} else if (elementH > 200) {
|
|
91
|
-
for (let x = 1; x <= this.props.positiveUnitsNumber; x++) {
|
|
92
|
-
let val = (this.props.positiveUnitsNumber - x) * 100;
|
|
93
|
-
positiveDomElements.push(
|
|
94
|
-
<div key={x} style={{ ...elementStyle, gridColumn: 1, gridRow: x }}>
|
|
95
|
-
<div style={insideElementsStyle}>{val + 4 * 20}</div>
|
|
96
|
-
<div style={insideElementsStyle}>{val + 3 * 20}</div>
|
|
97
|
-
<div style={insideElementsStyle}>{val + 2 * 20}</div>
|
|
98
|
-
<div style={insideElementsStyle}>{val + 1 * 20}</div>
|
|
99
|
-
<div style={insideElementsStyle}>{val}</div>
|
|
100
|
-
</div>
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return (
|
|
106
|
-
<div style={rulerStyle}>
|
|
107
|
-
<div id="verticalMarker" style={markerStyle}></div>
|
|
108
|
-
<div id="negativeRuler" style={negativeRulerContainer}></div>
|
|
109
|
-
<div id="positiveRuler" style={positiveRulerContainer}>
|
|
110
|
-
{positiveDomElements}
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
RulerY.propTypes = {
|
|
118
|
-
unitPixelSize: PropTypes.number.isRequired,
|
|
119
|
-
zoom: PropTypes.number.isRequired,
|
|
120
|
-
mouseY: PropTypes.number.isRequired,
|
|
121
|
-
height: PropTypes.number.isRequired,
|
|
122
|
-
zeroTopPosition: PropTypes.number.isRequired,
|
|
123
|
-
backgroundColor: PropTypes.string,
|
|
124
|
-
fontColor: PropTypes.string,
|
|
125
|
-
markerColor: PropTypes.string
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
RulerY.defaultProps = {
|
|
129
|
-
positiveUnitsNumber: 50,
|
|
130
|
-
negativeUnitsNumber: 50,
|
|
131
|
-
backgroundColor: SharedStyle.PRIMARY_COLOR.main,
|
|
132
|
-
fontColor: SharedStyle.COLORS.white,
|
|
133
|
-
markerColor: SharedStyle.SECONDARY_COLOR.main
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
RulerY.contextTypes = {
|
|
137
|
-
translator: PropTypes.object.isRequired
|
|
138
|
-
};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import React, { Component } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { Layer, Grids } from './export';
|
|
4
|
-
import { searchForSkuValue } from './utils';
|
|
5
|
-
|
|
6
|
-
export default class Scene extends Component {
|
|
7
|
-
async componentWillReceiveProps(nextProps) {
|
|
8
|
-
// console.log("componentDidMount", this.props.scene.hashCode(), nextProps.scene.hashCode());
|
|
9
|
-
if (this.props.scene.hashCode() !== nextProps.scene.hashCode()) {
|
|
10
|
-
let { scene, catalog } = nextProps;
|
|
11
|
-
let { height, layers } = scene;
|
|
12
|
-
let selectedLayer = layers.get(scene.selectedLayer);
|
|
13
|
-
|
|
14
|
-
var msg = '';
|
|
15
|
-
var isNotFoundInElements = false;
|
|
16
|
-
var itemType = '';
|
|
17
|
-
selectedLayer.items.valueSeq().forEach(item => {
|
|
18
|
-
if (!catalog.elements.hasOwnProperty(item.type)) {
|
|
19
|
-
itemType = item.type;
|
|
20
|
-
isNotFoundInElements = true;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
// if(isNotFoundInElements){
|
|
24
|
-
// const deepSearchResult = await searchForSkuValue(catalog, selectedLayer, itemType)
|
|
25
|
-
// if(!deepSearchResult.isAvailable){
|
|
26
|
-
// msg += (`Element ${itemType} does not exist in catalog.\n`);
|
|
27
|
-
// }
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
// if(msg !== '') {
|
|
31
|
-
// msg += `Do you want to initialize?`;
|
|
32
|
-
// confirm(msg)
|
|
33
|
-
// ? this.context.projectActions.newProject()
|
|
34
|
-
// : null
|
|
35
|
-
// }
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
39
|
-
return this.props.scene.hashCode() !== nextProps.scene.hashCode();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
render() {
|
|
43
|
-
// console.log("scene", this);
|
|
44
|
-
let { scene, catalog } = this.props;
|
|
45
|
-
let { height, layers } = scene;
|
|
46
|
-
let selectedLayer = layers.get(scene.selectedLayer);
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<g>
|
|
50
|
-
<Grids scene={scene} />
|
|
51
|
-
|
|
52
|
-
<g style={{ pointerEvents: 'none' }}>
|
|
53
|
-
{layers
|
|
54
|
-
.entrySeq()
|
|
55
|
-
.filter(
|
|
56
|
-
([layerID, layer]) =>
|
|
57
|
-
layerID !== scene.selectedLayer && layer.visible
|
|
58
|
-
)
|
|
59
|
-
.map(([layerID, layer]) => (
|
|
60
|
-
<Layer
|
|
61
|
-
key={layerID}
|
|
62
|
-
layer={layer}
|
|
63
|
-
scene={scene}
|
|
64
|
-
catalog={catalog}
|
|
65
|
-
mode={this.props.state.mode}
|
|
66
|
-
state={this.props.state}
|
|
67
|
-
relatedLines={this.props.relatedLines}
|
|
68
|
-
/>
|
|
69
|
-
))}
|
|
70
|
-
</g>
|
|
71
|
-
|
|
72
|
-
<Layer
|
|
73
|
-
key={selectedLayer.id}
|
|
74
|
-
layer={selectedLayer}
|
|
75
|
-
scene={scene}
|
|
76
|
-
catalog={catalog}
|
|
77
|
-
mode={this.props.state.mode}
|
|
78
|
-
state={this.props.state}
|
|
79
|
-
relatedLines={this.props.relatedLines}
|
|
80
|
-
/>
|
|
81
|
-
</g>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
Scene.propTypes = {
|
|
87
|
-
scene: PropTypes.object.isRequired,
|
|
88
|
-
catalog: PropTypes.object.isRequired,
|
|
89
|
-
relatedLines: PropTypes.object.isRequired
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
Scene.contextTypes = {
|
|
93
|
-
projectActions: PropTypes.object.isRequired
|
|
94
|
-
};
|