@vcmap/ui 6.0.0-rc.1 → 6.0.0-rc.3
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/build/build.js +40 -60
- package/build/buildHelpers.js +2 -8
- package/build/info/conf.json +1 -1
- package/config/base.config.json +4 -4
- package/config/projects.config.json +2 -1
- package/config/splashscreen.config.json +45 -0
- package/dist/.htaccess +7 -0
- package/dist/assets/@mdi/font/README.md +25 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min-7a4f6be0.css +3 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
- package/dist/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/dist/assets/cesium/Assets/approximateTerrainHeights.json +1 -1
- package/dist/assets/cesium/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/assets/cesium/Workers/{chunk-ZA25DG4Y.js → chunk-3DRPXHZ4.js} +11 -11
- package/dist/assets/cesium/Workers/{chunk-OAVNIRB4.js → chunk-3GI7DWF7.js} +5 -7
- package/dist/assets/cesium/Workers/{chunk-TFC6TZ3S.js → chunk-4EW3HFFI.js} +33 -22
- package/dist/assets/cesium/Workers/{chunk-LLUNNUJV.js → chunk-4OX4RYLB.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-66QLLS45.js → chunk-4RJH3H6D.js} +11 -9
- package/dist/assets/cesium/Workers/{chunk-MPAZH4BF.js → chunk-5OUTANXX.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-WXTV4ATB.js → chunk-6DH5PLFD.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-A4JVFBQ3.js → chunk-6DXIYFX3.js} +2 -2
- package/dist/assets/cesium/Workers/chunk-A5C2A5O5.js +963 -0
- package/dist/assets/cesium/Workers/{chunk-HQF437NJ.js → chunk-AGTH5JMJ.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-RP2A7BR5.js → chunk-AVFIYUKX.js} +12 -14
- package/dist/assets/cesium/Workers/{chunk-227AJNOA.js → chunk-BAJAVGUF.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-N3JIFFX2.js → chunk-BPY4HDAK.js} +5 -6
- package/dist/assets/cesium/Workers/{chunk-ABADGKYE.js → chunk-D6PDWQXW.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-34YUDLRP.js → chunk-DR7LK6PG.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-OYFCF4PL.js → chunk-DTACCQDR.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-C3SXRKRW.js → chunk-EVU2UNBD.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-6BTKZDRG.js → chunk-F7IEM66T.js} +3 -5
- package/dist/assets/cesium/Workers/{chunk-QT3MPEMI.js → chunk-FSXNF76Y.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-PCJWUS4M.js → chunk-FYYT5EVH.js} +830 -14
- package/dist/assets/cesium/Workers/{chunk-QMEMZIJI.js → chunk-FZDKIUDT.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-XTY7B2N6.js → chunk-G6346EDR.js} +16 -16
- package/dist/assets/cesium/Workers/{chunk-CHHNOC2C.js → chunk-H7PSTL64.js} +95 -155
- package/dist/assets/cesium/Workers/{chunk-2R5O53JW.js → chunk-I67V66MN.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-JS3AW5BK.js → chunk-IALQGTA2.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-K36FEYS7.js → chunk-KNMGSIIN.js} +16 -12
- package/dist/assets/cesium/Workers/{chunk-J3JY6I2C.js → chunk-L4XQPD6P.js} +49 -88
- package/dist/assets/cesium/Workers/{chunk-X4SU25DT.js → chunk-LMTN7R7M.js} +10 -12
- package/dist/assets/cesium/Workers/{chunk-JB2LWGH4.js → chunk-LUYI3XCB.js} +14 -14
- package/dist/assets/cesium/Workers/{chunk-AFFLIKOH.js → chunk-N5MIFVXJ.js} +7 -7
- package/dist/assets/cesium/Workers/{chunk-MYZB7C4T.js → chunk-O7OUBDMZ.js} +10 -10
- package/dist/assets/cesium/Workers/{chunk-VLGOATD6.js → chunk-P24I5VUS.js} +22 -22
- package/dist/assets/cesium/Workers/{chunk-KD4Y7CZL.js → chunk-PIOKSAZH.js} +15 -17
- package/dist/assets/cesium/Workers/{chunk-3W63OHNJ.js → chunk-PRKEY4QK.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-O5AMBQ36.js → chunk-Q7PM4W34.js} +8 -8
- package/dist/assets/cesium/Workers/{chunk-GLZBE3ML.js → chunk-QLC66ZRL.js} +13 -13
- package/dist/assets/cesium/Workers/{chunk-OZJDGN5F.js → chunk-RRLGJV3Q.js} +16 -16
- package/dist/assets/cesium/Workers/{chunk-CCFQRR6D.js → chunk-S2UEXF6T.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-QIKODV5G.js → chunk-S4VTLNAJ.js} +4 -4
- package/dist/assets/cesium/Workers/{chunk-EW2GWJYB.js → chunk-SJC5PRDX.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-KTJSNCK4.js → chunk-T6TZXGG5.js} +230 -20
- package/dist/assets/cesium/Workers/{chunk-RW6LU2CJ.js → chunk-TLGODPEV.js} +5 -5
- package/dist/assets/cesium/Workers/{chunk-CTELOFLA.js → chunk-UC566ISB.js} +6 -6
- package/dist/assets/cesium/Workers/{chunk-ZFOBYDGF.js → chunk-UMX265HW.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-Z24VKNDO.js → chunk-V7WJDCPA.js} +12 -12
- package/dist/assets/cesium/Workers/{chunk-4MFFIWUA.js → chunk-VD6G7UPU.js} +2 -2
- package/dist/assets/cesium/Workers/{chunk-XY7MGBKC.js → chunk-WMVCLETM.js} +14 -16
- package/dist/assets/cesium/Workers/{chunk-IPA4EACJ.js → chunk-WOA6WSHH.js} +12 -12
- package/dist/assets/cesium/Workers/{chunk-PFQBCKBM.js → chunk-X67EJ6X6.js} +4398 -2722
- package/dist/assets/cesium/Workers/{chunk-V3NGATMV.js → chunk-XGI4FRXF.js} +11 -13
- package/dist/assets/cesium/Workers/{chunk-AHKEZ2OE.js → chunk-YFVI4SQI.js} +1 -1
- package/dist/assets/cesium/Workers/{chunk-HARLBUOL.js → chunk-YFYPR4MW.js} +11 -8
- package/dist/assets/cesium/Workers/combineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/createBoxGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createBoxOutlineGeometry.js +14 -15
- package/dist/assets/cesium/Workers/createCircleGeometry.js +29 -26
- package/dist/assets/cesium/Workers/createCircleOutlineGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createCoplanarPolygonGeometry.js +35 -36
- package/dist/assets/cesium/Workers/createCoplanarPolygonOutlineGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createCorridorGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createCorridorOutlineGeometry.js +27 -28
- package/dist/assets/cesium/Workers/createCylinderGeometry.js +18 -19
- package/dist/assets/cesium/Workers/createCylinderOutlineGeometry.js +17 -19
- package/dist/assets/cesium/Workers/createEllipseGeometry.js +24 -25
- package/dist/assets/cesium/Workers/createEllipseOutlineGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createEllipsoidGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createEllipsoidOutlineGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createFrustumGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createFrustumOutlineGeometry.js +18 -18
- package/dist/assets/cesium/Workers/createGeometry.js +52 -33
- package/dist/assets/cesium/Workers/createGroundPolylineGeometry.js +28 -29
- package/dist/assets/cesium/Workers/createPlaneGeometry.js +14 -15
- package/dist/assets/cesium/Workers/createPlaneOutlineGeometry.js +13 -14
- package/dist/assets/cesium/Workers/createPolygonGeometry.js +451 -176
- package/dist/assets/cesium/Workers/createPolygonOutlineGeometry.js +29 -30
- package/dist/assets/cesium/Workers/createPolylineGeometry.js +24 -25
- package/dist/assets/cesium/Workers/createPolylineVolumeGeometry.js +31 -33
- package/dist/assets/cesium/Workers/createPolylineVolumeOutlineGeometry.js +27 -29
- package/dist/assets/cesium/Workers/createRectangleGeometry.js +30 -31
- package/dist/assets/cesium/Workers/createRectangleOutlineGeometry.js +21 -24
- package/dist/assets/cesium/Workers/createSimplePolylineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/createSphereGeometry.js +17 -18
- package/dist/assets/cesium/Workers/createSphereOutlineGeometry.js +16 -17
- package/dist/assets/cesium/Workers/createTaskProcessorWorker.js +3 -3
- package/dist/assets/cesium/Workers/createVectorTileClampedPolylines.js +14 -16
- package/dist/assets/cesium/Workers/createVectorTileGeometries.js +22 -23
- package/dist/assets/cesium/Workers/createVectorTilePoints.js +12 -12
- package/dist/assets/cesium/Workers/createVectorTilePolygons.js +20 -21
- package/dist/assets/cesium/Workers/createVectorTilePolylines.js +14 -16
- package/dist/assets/cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -25
- package/dist/assets/cesium/Workers/createVerticesFromHeightmap.js +25 -26
- package/dist/assets/cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +19 -21
- package/dist/assets/cesium/Workers/createWallGeometry.js +23 -24
- package/dist/assets/cesium/Workers/createWallOutlineGeometry.js +22 -23
- package/dist/assets/cesium/Workers/decodeDraco.js +11 -11
- package/dist/assets/cesium/Workers/decodeGoogleEarthEnterprisePacket.js +12 -19
- package/dist/assets/cesium/Workers/decodeI3S.js +600 -92
- package/dist/assets/cesium/Workers/transcodeKTX2.js +46 -82
- package/dist/assets/cesium/Workers/transferTypedArrayTest.js +1 -1
- package/dist/assets/cesium/Workers/upsampleQuantizedTerrainMesh.js +21 -22
- package/dist/assets/{cesium.6b12b4.js → cesium-cb4dbfba.js} +151166 -145641
- package/dist/assets/cesium.js +1 -1
- package/dist/assets/{core.074b78.js → core-72f21835.js} +2299 -2225
- package/dist/assets/core.js +1 -1
- package/dist/assets/{ol.8b2e3a.js → ol-2d33bc8b.js} +42505 -44282
- package/dist/assets/ol.js +1 -1
- package/dist/assets/ui-2ab43a16.css +1 -0
- package/dist/assets/{ui.715986.js → ui-2ab43a16.js} +12001 -11136
- package/dist/assets/ui.js +1 -1
- package/dist/assets/vue.js +1 -1
- package/dist/assets/{vuetify.28d881.css → vuetify-760ced3b.css} +1 -1
- package/dist/assets/{vuetify.28d881.js → vuetify-760ced3b.js} +5720 -5662
- package/dist/assets/vuetify.js +1 -1
- package/dist/index.html +11 -10
- package/index.d.ts +9 -5
- package/index.html +5 -5
- package/index.js +4 -3
- package/lib/olLib.js +84 -23
- package/package.json +10 -9
- package/plugins/@vcmap-show-case/flight-component-example/src/FlightExample.vue +41 -1
- package/plugins/@vcmap-show-case/form-inputs-example/src/FormInputsExample.vue +70 -30
- package/plugins/@vcmap-show-case/form-inputs-example/src/exampleActions.js +7 -11
- package/plugins/@vcmap-show-case/form-inputs-example/src/index.js +2 -2
- package/plugins/@vcmap-show-case/list-example/src/ListExample.vue +45 -94
- package/plugins/@vcmap-show-case/style-input-example/src/StyleExample.vue +29 -90
- package/plugins/@vcmap-show-case/vector-properties-example/src/VectorPropertiesExample.vue +35 -10
- package/plugins/@vcmap-show-case/wizard-example/src/WizardExample.vue +40 -54
- package/public/assets/@mdi/font/README.md +25 -0
- package/public/assets/@mdi/font/css/materialdesignicons.min.css +2 -2
- package/public/assets/@mdi/font/css/materialdesignicons.min.css.map +16 -0
- package/public/assets/@mdi/font/fonts/materialdesignicons-webfont.woff2 +0 -0
- package/src/actions/actionHelper.js +20 -20
- package/src/actions/flightActions.js +5 -5
- package/src/actions/listActions.d.ts +0 -7
- package/src/actions/listActions.js +4 -20
- package/src/actions/stateRefAction.js +2 -2
- package/src/application/VcsApp.vue +53 -29
- package/src/application/VcsApp.vue.d.ts +1 -0
- package/src/application/VcsAttributions.vue +2 -13
- package/src/application/VcsAttributionsFooter.vue +10 -11
- package/src/application/VcsNavbar.vue.d.ts +1 -1
- package/src/application/VcsPositionDisplay.vue +8 -23
- package/src/application/VcsPositionDisplay.vue.d.ts +0 -1
- package/src/application/VcsSettings.vue +10 -17
- package/src/application/VcsSplashScreen.vue +34 -54
- package/src/application/VcsSplashScreen.vue.d.ts +4 -6
- package/src/application/VcsTextPage.vue +13 -44
- package/src/application/VcsTextPage.vue.d.ts +4 -8
- package/src/application/VcsTextPageFooter.vue +22 -40
- package/src/application/markdownHelper.js +2 -17
- package/src/components/buttons/VcsButton.vue +1 -1
- package/src/components/buttons/VcsButton.vue.d.ts +3 -3
- package/src/components/buttons/VcsFormButton.vue +1 -1
- package/src/components/buttons/VcsFormButton.vue.d.ts +2 -2
- package/src/components/buttons/VcsToolButton.vue +1 -1
- package/src/components/buttons/VcsToolButton.vue.d.ts +4 -4
- package/src/components/composables.d.ts +7 -0
- package/src/components/composables.js +35 -1
- package/src/components/extent/VcsExtentEditor.vue +1 -1
- package/src/components/flight/VcsFlightAnchorsComponent.vue +63 -36
- package/src/components/flight/VcsFlightComponent.vue +16 -21
- package/src/components/flight/VcsFlightPlayer.vue +27 -5
- package/src/components/form-inputs-controls/VcsCheckbox.vue +19 -11
- package/src/components/form-inputs-controls/VcsCheckbox.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsChipArrayInput.vue +1 -1
- package/src/components/form-inputs-controls/VcsCoordinate.vue +13 -1
- package/src/components/form-inputs-controls/VcsCoordinate.vue.d.ts +5 -2
- package/src/components/form-inputs-controls/VcsDatePicker.vue +34 -60
- package/src/components/form-inputs-controls/VcsDatePicker.vue.d.ts +2 -64
- package/src/components/form-inputs-controls/VcsFileInput.vue +18 -19
- package/src/components/form-inputs-controls/VcsFileInput.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsLabel.vue +31 -1
- package/src/components/form-inputs-controls/VcsLabel.vue.d.ts +21 -1
- package/src/components/form-inputs-controls/VcsRadio.vue +19 -5
- package/src/components/form-inputs-controls/VcsRadio.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsSelect.vue +44 -41
- package/src/components/form-inputs-controls/VcsSelect.vue.d.ts +7 -4
- package/src/components/form-inputs-controls/VcsSlider.vue +49 -10
- package/src/components/form-inputs-controls/VcsSlider.vue.d.ts +28 -2
- package/src/components/form-inputs-controls/VcsTextArea.vue +54 -35
- package/src/components/form-inputs-controls/VcsTextArea.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsTextField.vue +21 -14
- package/src/components/form-inputs-controls/VcsTextField.vue.d.ts +1 -0
- package/src/components/form-inputs-controls/VcsWizard.vue +89 -112
- package/src/components/form-inputs-controls/VcsWizard.vue.d.ts +3 -13
- package/src/components/form-inputs-controls/VcsWizardStep.vue +75 -57
- package/src/components/form-inputs-controls/VcsWizardStep.vue.d.ts +24 -11
- package/src/components/form-inputs-controls/vcsTextField.scss +13 -8
- package/src/components/form-output/VcsFormattedNumber.vue +40 -10
- package/src/components/form-output/VcsFormattedNumber.vue.d.ts +27 -0
- package/src/components/form-output/VcsMarkdown.vue +53 -0
- package/src/{application/VcsCustomScreen.vue.d.ts → components/form-output/VcsMarkdown.vue.d.ts} +6 -5
- package/src/components/lists/VcsActionList.vue +50 -34
- package/src/components/lists/VcsActionList.vue.d.ts +3 -1
- package/src/components/lists/VcsList.vue +82 -158
- package/src/components/lists/VcsList.vue.d.ts +7 -14
- package/src/components/lists/VcsListItem.vue +184 -0
- package/src/components/lists/VcsListItem.vue.d.ts +27 -0
- package/src/components/lists/VcsTreeviewLeaf.vue +1 -1
- package/src/components/modelHelper.d.ts +11 -0
- package/src/components/modelHelper.js +42 -2
- package/src/components/section/VcsExpansionPanel.vue +101 -0
- package/src/components/section/VcsExpansionPanel.vue.d.ts +19 -0
- package/src/components/style/MenuWrapper.vue +24 -26
- package/src/components/style/MenuWrapper.vue.d.ts +4 -4
- package/src/components/style/VcsFillMenu.vue +9 -16
- package/src/components/style/VcsFillMenu.vue.d.ts +0 -18
- package/src/components/style/VcsFillSelector.vue +13 -16
- package/src/components/style/VcsImageMenu.vue +8 -25
- package/src/components/style/VcsImageMenu.vue.d.ts +0 -27
- package/src/components/style/VcsImageSelector.vue +102 -167
- package/src/components/style/VcsImageSelector.vue.d.ts +15 -15
- package/src/components/style/VcsStrokeMenu.vue +8 -15
- package/src/components/style/VcsStrokeMenu.vue.d.ts +0 -18
- package/src/components/style/VcsStrokeSelector.vue +11 -18
- package/src/components/style/VcsTextMenu.vue +9 -12
- package/src/components/style/VcsTextMenu.vue.d.ts +0 -9
- package/src/components/style/VcsTextSelector.vue +79 -95
- package/src/components/style/VcsTextSelector.vue.d.ts +20 -22
- package/src/components/style/VcsVectorStyleComponent.vue +7 -18
- package/src/components/style/VcsVectorStyleComponent.vue.d.ts +1 -1
- package/src/components/style/composables.d.ts +0 -14
- package/src/components/style/composables.js +0 -49
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue +53 -12
- package/src/components/vector-properties/VcsFeatureEditingWindow.vue.d.ts +3 -3
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue +475 -586
- package/src/components/vector-properties/VcsVectorPropertiesComponent.vue.d.ts +193 -22
- package/src/components/viewpoint/VcsViewpointComponent.vue +21 -8
- package/src/components/viewpoint/VcsViewpointEditor.vue +1 -0
- package/src/contentTree/contentTreeItem.d.ts +2 -2
- package/src/contentTree/contentTreeItem.js +7 -7
- package/src/featureInfo/featureInfo.js +8 -10
- package/src/init.d.ts +5 -38
- package/src/init.js +19 -18
- package/src/legend/StyleLegendItem.vue +4 -9
- package/src/legend/VcsLegend.vue +28 -54
- package/src/manager/buttonManager.js +4 -4
- package/src/manager/collectionManager/CollectionComponent.vue +17 -42
- package/src/manager/collectionManager/CollectionComponent.vue.d.ts +4 -2
- package/src/manager/collectionManager/CollectionComponentContent.vue +7 -6
- package/src/manager/collectionManager/CollectionComponentContent.vue.d.ts +3 -1
- package/src/manager/collectionManager/CollectionComponentList.vue +10 -8
- package/src/manager/collectionManager/CollectionComponentList.vue.d.ts +4 -2
- package/src/manager/collectionManager/CollectionComponentProvider.vue +1 -1
- package/src/manager/collectionManager/CollectionComponentStandalone.vue +3 -2
- package/src/manager/collectionManager/CollectionManager.vue +1 -1
- package/src/manager/collectionManager/collectionComponentClass.js +6 -9
- package/src/manager/collectionManager/collectionManager.js +10 -10
- package/src/manager/collectionManager/editorCollectionComponentClass.js +4 -4
- package/src/manager/contextMenu/contextMenuManager.js +2 -2
- package/src/manager/navbarManager.js +2 -2
- package/src/manager/panel/panelManager.js +3 -3
- package/src/manager/toolbox/toolboxManager.js +10 -10
- package/src/manager/window/windowManager.d.ts +6 -6
- package/src/manager/window/windowManager.js +6 -6
- package/src/navigation/MapNavigation.vue +6 -3
- package/src/navigation/OrientationToolsButton.vue +39 -26
- package/src/navigation/OrientationToolsButton.vue.d.ts +5 -1
- package/src/navigation/TiltSlider.vue +83 -88
- package/src/navigation/TiltSlider.vue.d.ts +10 -7
- package/src/navigation/VcsCompass.vue +17 -11
- package/src/navigation/VcsCompass.vue.d.ts +2 -0
- package/src/search/search.js +2 -2
- package/src/siteConfig.js +1 -1
- package/src/state.js +4 -4
- package/src/styles/_typography.scss +1 -0
- package/src/vcsUiApp.d.ts +24 -26
- package/src/vcsUiApp.js +11 -4
- package/src/vuePlugins/i18n.js +7 -0
- package/src/vuePlugins/vuetify.d.ts +2 -0
- package/src/vuePlugins/vuetify.js +15 -0
- package/dist/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
- package/dist/assets/@mdi/font/css/materialdesignicons.min.e3f476.css +0 -3
- package/dist/assets/cesium/Workers/chunk-DUHWWBQQ.js +0 -3273
- package/dist/assets/cesium/Workers/chunk-QJ3DFBH3.js +0 -73
- package/dist/assets/index-ca7EmZ3d.js +0 -1
- package/dist/assets/ui.715986.css +0 -1
- package/public/assets/@mdi/font/css/materialdesignicons.css.map +0 -16
- package/src/application/VcsCustomScreen.vue +0 -45
- package/src/components/vector-properties/composables.d.ts +0 -33
- package/src/components/vector-properties/composables.js +0 -100
- package/dist/assets/{favicon-128.4c4ce5.png → favicon-128-4c4ce5df.png} +0 -0
- package/dist/assets/{favicon-180.5b99c0.png → favicon-180-4c4ce5df.png} +0 -0
- package/dist/assets/{favicon-192.0e205e.png → favicon-192-4c4ce5df.png} +0 -0
- package/dist/assets/{favicon-32.6b9add.png → favicon-32-4c4ce5df.png} +0 -0
- package/dist/assets/{favicon.d5ec97.svg → favicon-4c4ce5df.svg} +0 -0
- package/dist/assets/font/{TitilliumWeb-Regular.9ca076.woff2 → TitilliumWeb-Regular-9ca076be.woff2} +0 -0
- package/dist/assets/style/{icon-marker.70960f.png → icon-marker-70960f05.png} +0 -0
- package/dist/assets/style/{icon-marker-blue.534e37.png → icon-marker-blue-534e374b.png} +0 -0
- package/dist/assets/style/{icon-marker-green.0b6a92.png → icon-marker-green-0b6a92bc.png} +0 -0
- package/dist/assets/style/{icon-marker-o.036477.png → icon-marker-o-036477fa.png} +0 -0
- package/dist/assets/style/{icon-marker-o-blue.7b6d62.png → icon-marker-o-blue-7b6d6279.png} +0 -0
- package/dist/assets/style/{icon-marker-o-green.c863c0.png → icon-marker-o-green-c863c0fa.png} +0 -0
- package/dist/assets/style/{icon-marker-o-red.93ff58.png → icon-marker-o-red-93ff58df.png} +0 -0
- package/dist/assets/style/{icon-marker-red.313d03.png → icon-marker-red-313d03e8.png} +0 -0
- package/dist/assets/style/{icon-pin.b7ce77.png → icon-pin-b7ce771e.png} +0 -0
- package/dist/assets/style/{icon-pin-blue.7be369.png → icon-pin-blue-7be369a3.png} +0 -0
- package/dist/assets/style/{icon-pin-green.cbb935.png → icon-pin-green-cbb935fe.png} +0 -0
- package/dist/assets/style/{icon-pin-red.3f25b2.png → icon-pin-red-3f25b245.png} +0 -0
- package/dist/assets/{vue.0f2c53.js → vue-03b265aa.js} +0 -0
- package/public/assets/{favicon-128.png → favicon-128-4c4ce5df.png} +0 -0
- package/public/assets/{favicon-180.png → favicon-180-4c4ce5df.png} +0 -0
- package/public/assets/{favicon-192.png → favicon-192-4c4ce5df.png} +0 -0
- package/public/assets/{favicon-32.png → favicon-32-4c4ce5df.png} +0 -0
- package/public/assets/{favicon.svg → favicon-4c4ce5df.svg} +0 -0
- package/src/components/{form-inputs-controls → section}/VcsFormSection.vue +0 -0
- package/src/components/{form-inputs-controls → section}/VcsFormSection.vue.d.ts +1 -1
|
@@ -25,13 +25,21 @@
|
|
|
25
25
|
<v-divider />
|
|
26
26
|
<v-container class="px-1 pt-1 pb-0">
|
|
27
27
|
<VcsRadio
|
|
28
|
-
v-model="
|
|
28
|
+
v-model="selectedIdx"
|
|
29
29
|
:items="currentItems"
|
|
30
|
-
:disabled="!
|
|
31
|
-
item-value="
|
|
30
|
+
:disabled="!modelValue"
|
|
31
|
+
item-value="idx"
|
|
32
|
+
label-position="top"
|
|
33
|
+
inline
|
|
34
|
+
class="d-flex justify-center"
|
|
32
35
|
>
|
|
33
|
-
<template #
|
|
34
|
-
<
|
|
36
|
+
<template #label="{ item }">
|
|
37
|
+
<img
|
|
38
|
+
v-if="selectedType !== ImageType.SHAPE"
|
|
39
|
+
:src="item.src"
|
|
40
|
+
alt="shape"
|
|
41
|
+
/>
|
|
42
|
+
<v-icon v-else size="24">{{ item.src }}</v-icon>
|
|
35
43
|
</template>
|
|
36
44
|
</VcsRadio>
|
|
37
45
|
<div v-if="selectedType === ImageType.ICON">
|
|
@@ -44,7 +52,7 @@
|
|
|
44
52
|
<v-col>
|
|
45
53
|
<VcsSlider
|
|
46
54
|
id="style-icon-opacity"
|
|
47
|
-
v-model="
|
|
55
|
+
v-model="localValue.opacity"
|
|
48
56
|
step="0.1"
|
|
49
57
|
type="number"
|
|
50
58
|
max="1"
|
|
@@ -58,18 +66,18 @@
|
|
|
58
66
|
<v-row
|
|
59
67
|
no-gutters
|
|
60
68
|
v-for="input in shapeSingleValueInputs"
|
|
61
|
-
:key="input.
|
|
69
|
+
:key="input.key"
|
|
62
70
|
>
|
|
63
71
|
<v-col>
|
|
64
|
-
<VcsLabel>{{ $st(`components.style.${input.
|
|
72
|
+
<VcsLabel>{{ $st(`components.style.${input.key}`) }}</VcsLabel>
|
|
65
73
|
</v-col>
|
|
66
74
|
<v-col cols="3">
|
|
67
75
|
<VcsTextField
|
|
68
|
-
:id="`style-shape-${input.
|
|
76
|
+
:id="`style-shape-${input.key}`"
|
|
69
77
|
:hide-spin-buttons="true"
|
|
70
78
|
type="number"
|
|
71
79
|
:unit="input.unit || ''"
|
|
72
|
-
v-model.number="input.
|
|
80
|
+
v-model.number="localValue[input.key]"
|
|
73
81
|
:disabled="currentType !== ImageType.SHAPE"
|
|
74
82
|
:step="input.step || 1"
|
|
75
83
|
:min="input.range?.[0] || 0"
|
|
@@ -110,22 +118,22 @@
|
|
|
110
118
|
</v-row>
|
|
111
119
|
<VcsStrokeMenu
|
|
112
120
|
v-if="selectedType === ImageType.SHAPE"
|
|
113
|
-
v-model="
|
|
121
|
+
v-model="localValue.stroke"
|
|
114
122
|
:value-default="valueDefault?.stroke"
|
|
115
|
-
:disabled="!
|
|
123
|
+
:disabled="!localValue || currentType !== ImageType.SHAPE"
|
|
116
124
|
/>
|
|
117
125
|
<VcsFillMenu
|
|
118
126
|
v-if="selectedType === ImageType.SHAPE"
|
|
119
|
-
v-model="
|
|
127
|
+
v-model="localValue.fill"
|
|
120
128
|
:value-default="valueDefault?.fill"
|
|
121
|
-
:disabled="!
|
|
129
|
+
:disabled="!localValue || currentType !== ImageType.SHAPE"
|
|
122
130
|
/>
|
|
123
131
|
</v-container>
|
|
124
132
|
</v-sheet>
|
|
125
133
|
</template>
|
|
126
134
|
|
|
127
135
|
<script>
|
|
128
|
-
import { computed, onMounted, ref, watch } from 'vue';
|
|
136
|
+
import { computed, onMounted, ref, toRaw, watch } from 'vue';
|
|
129
137
|
import {
|
|
130
138
|
VSheet,
|
|
131
139
|
VDivider,
|
|
@@ -136,16 +144,18 @@
|
|
|
136
144
|
VTabs,
|
|
137
145
|
VTab,
|
|
138
146
|
} from 'vuetify/components';
|
|
139
|
-
import {
|
|
147
|
+
import { Icon, Style } from 'ol/style.js';
|
|
140
148
|
import { toContext } from 'ol/render.js';
|
|
141
149
|
import { Point } from 'ol/geom.js';
|
|
150
|
+
import { getImageStyleFromOptions } from '@vcmap/core';
|
|
151
|
+
import { useProxiedComplexModel } from '../modelHelper.js';
|
|
142
152
|
import VcsLabel from '../form-inputs-controls/VcsLabel.vue';
|
|
143
153
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
|
144
154
|
import VcsSlider from '../form-inputs-controls/VcsSlider.vue';
|
|
145
155
|
import VcsRadio from '../form-inputs-controls/VcsRadio.vue';
|
|
146
156
|
import VcsFillMenu from './VcsFillMenu.vue';
|
|
147
157
|
import VcsStrokeMenu from './VcsStrokeMenu.vue';
|
|
148
|
-
import {
|
|
158
|
+
import { between } from './composables.js';
|
|
149
159
|
|
|
150
160
|
/**
|
|
151
161
|
* @enum {string}
|
|
@@ -160,8 +170,8 @@
|
|
|
160
170
|
/**
|
|
161
171
|
* Draws an image style on a canvas.
|
|
162
172
|
* @param {HTMLCanvasElement} canvas The canvas to draw on
|
|
163
|
-
* @param {import("ol/style/Image").Options} imageOptions The JSON options of the image style.
|
|
164
|
-
* @param {boolean} fitToCanvas If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
|
|
173
|
+
* @param {import("ol/style/Image").Options} [imageOptions] The JSON options of the image style.
|
|
174
|
+
* @param {boolean} [fitToCanvas=false] If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
|
|
165
175
|
*/
|
|
166
176
|
export async function drawImageStyle(
|
|
167
177
|
canvas,
|
|
@@ -177,37 +187,9 @@
|
|
|
177
187
|
let imageStyle;
|
|
178
188
|
let size;
|
|
179
189
|
if (imageOptions.radius) {
|
|
180
|
-
// TODO: Replace with getImageStyleFromOptions from styleHelpers.ts in @vcmap/core
|
|
181
190
|
const { radius } = imageOptions;
|
|
182
191
|
size = [radius * 2, radius * 2];
|
|
183
|
-
|
|
184
|
-
stroke: new Stroke(
|
|
185
|
-
imageOptions.stroke
|
|
186
|
-
? {
|
|
187
|
-
color: imageOptions.stroke.color,
|
|
188
|
-
width: imageOptions.stroke.width,
|
|
189
|
-
}
|
|
190
|
-
: null,
|
|
191
|
-
),
|
|
192
|
-
fill: new Fill(
|
|
193
|
-
imageOptions.fill
|
|
194
|
-
? {
|
|
195
|
-
color: imageOptions.fill.color,
|
|
196
|
-
}
|
|
197
|
-
: null,
|
|
198
|
-
),
|
|
199
|
-
radius,
|
|
200
|
-
};
|
|
201
|
-
if (imageOptions.points) {
|
|
202
|
-
options.radius2 = imageOptions.radius2;
|
|
203
|
-
options.angle = imageOptions.angle;
|
|
204
|
-
options.points = imageOptions.points;
|
|
205
|
-
options.rotation = imageOptions.rotation;
|
|
206
|
-
options.scale = imageOptions.scale;
|
|
207
|
-
imageStyle = new RegularShape(options);
|
|
208
|
-
} else {
|
|
209
|
-
imageStyle = new Circle(options);
|
|
210
|
-
}
|
|
192
|
+
imageStyle = getImageStyleFromOptions(imageOptions);
|
|
211
193
|
} else if (imageOptions.src) {
|
|
212
194
|
// Somehow the icon does not load the img when providing the src. And icon.load() is not async.
|
|
213
195
|
// Therefore the img first has to be loaded and then passed to new Icon
|
|
@@ -747,8 +729,8 @@
|
|
|
747
729
|
|
|
748
730
|
/**
|
|
749
731
|
* @description Allows to model a JSON representation of ol/style/Image style. It makes use of VcsStrokeMenu and VcsFillMenu.
|
|
750
|
-
* @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options}
|
|
751
|
-
* @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} valueDefault - The default image options
|
|
732
|
+
* @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} [modelValue] - The Image options
|
|
733
|
+
* @vue-prop {import("ol/style/RegularShape").Options | import("ol/style/Circle").Options | import("ol/style/Icon").Options} [valueDefault] - The default image options
|
|
752
734
|
* @vue-prop {Array<import("ol/style/Icon").Options>} [iconOptions] - The icon options too choose from. Scale and opacity are ignored. The defaults are 3 different shapes with 4 different colors.
|
|
753
735
|
* @vue-prop {boolean} [extendedShapeSettings=false] - If true, there are all the input fields needed to create arbitrary ol RegularShapes.
|
|
754
736
|
*/
|
|
@@ -789,10 +771,11 @@
|
|
|
789
771
|
},
|
|
790
772
|
},
|
|
791
773
|
setup(props, { emit }) {
|
|
774
|
+
const localValue = useProxiedComplexModel(props, 'modelValue', emit);
|
|
792
775
|
const currentType = computed(() => {
|
|
793
|
-
if (
|
|
776
|
+
if (localValue.value?.radius) {
|
|
794
777
|
return ImageType.SHAPE;
|
|
795
|
-
} else if (
|
|
778
|
+
} else if (localValue.value?.src) {
|
|
796
779
|
return ImageType.ICON;
|
|
797
780
|
} else {
|
|
798
781
|
return undefined;
|
|
@@ -814,136 +797,87 @@
|
|
|
814
797
|
const canvas = ref();
|
|
815
798
|
|
|
816
799
|
const shapeSingleValueInputs = computed(() => {
|
|
800
|
+
/**
|
|
801
|
+
* @type {[{key: string,isRequired?: boolean, unit?: string, range?: number[]}]}
|
|
802
|
+
*/
|
|
817
803
|
const inputs = [
|
|
818
|
-
{
|
|
804
|
+
{ key: 'radius', unit: 'px', range: [1, 100], isRequired: true },
|
|
819
805
|
];
|
|
820
806
|
if (props.extendedShapeSettings) {
|
|
821
|
-
|
|
822
|
-
{
|
|
823
|
-
{
|
|
824
|
-
{
|
|
825
|
-
{
|
|
826
|
-
|
|
807
|
+
inputs.push(
|
|
808
|
+
{ key: 'points', range: [0, 10] },
|
|
809
|
+
{ key: 'radius2', unit: 'px', range: [0, 100] },
|
|
810
|
+
{ key: 'angle', step: 0.1, unit: 'rad' },
|
|
811
|
+
{ key: 'rotation', step: 0.1, unit: 'rad' },
|
|
812
|
+
);
|
|
827
813
|
}
|
|
828
|
-
return inputs
|
|
829
|
-
return {
|
|
830
|
-
text: input.name,
|
|
831
|
-
value: useSelectedKey(
|
|
832
|
-
() => props.modelValue,
|
|
833
|
-
input.name,
|
|
834
|
-
props.valueDefault[input.name],
|
|
835
|
-
emit,
|
|
836
|
-
input.range,
|
|
837
|
-
input.isRequired,
|
|
838
|
-
),
|
|
839
|
-
unit: input.unit,
|
|
840
|
-
range: input.range,
|
|
841
|
-
step: input.step,
|
|
842
|
-
};
|
|
843
|
-
});
|
|
814
|
+
return inputs;
|
|
844
815
|
});
|
|
845
816
|
|
|
846
817
|
const selectedScale = computed({
|
|
847
818
|
get() {
|
|
848
|
-
if (Array.isArray(
|
|
849
|
-
return
|
|
819
|
+
if (Array.isArray(localValue.value?.scale)) {
|
|
820
|
+
return localValue.value.scale[0];
|
|
850
821
|
} else {
|
|
851
|
-
return
|
|
822
|
+
return localValue.value?.scale;
|
|
852
823
|
}
|
|
853
824
|
},
|
|
854
825
|
set(value) {
|
|
855
|
-
|
|
856
|
-
const newImage = structuredClone(props.modelValue);
|
|
857
|
-
delete newImage.scale;
|
|
858
|
-
emit('update:modelValue', newImage);
|
|
859
|
-
} else if (value > 0) {
|
|
860
|
-
const newImage = structuredClone(props.modelValue);
|
|
861
|
-
emit(
|
|
862
|
-
'update:modelValue',
|
|
863
|
-
Object.assign(newImage, { scale: value }),
|
|
864
|
-
);
|
|
865
|
-
}
|
|
826
|
+
localValue.value.scale = value;
|
|
866
827
|
},
|
|
867
828
|
});
|
|
868
829
|
|
|
869
|
-
const
|
|
870
|
-
() => props.modelValue,
|
|
871
|
-
'opacity',
|
|
872
|
-
props.valueDefault.opacity,
|
|
873
|
-
emit,
|
|
874
|
-
);
|
|
830
|
+
const selectedIdx = ref(-1);
|
|
875
831
|
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
);
|
|
882
|
-
const selectedStroke = useSelectedKey(
|
|
883
|
-
() => props.modelValue,
|
|
884
|
-
'stroke',
|
|
885
|
-
props.valueDefault.stroke,
|
|
886
|
-
emit,
|
|
887
|
-
);
|
|
832
|
+
watch(selectedType, () => {
|
|
833
|
+
// unset selection on tab change
|
|
834
|
+
if (currentType.value !== selectedType.value) {
|
|
835
|
+
selectedIdx.value = -1;
|
|
836
|
+
}
|
|
837
|
+
});
|
|
888
838
|
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
const
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
} else {
|
|
900
|
-
return customIcon;
|
|
901
|
-
}
|
|
839
|
+
watch(
|
|
840
|
+
localValue,
|
|
841
|
+
() => {
|
|
842
|
+
// derive selection on modelValue change
|
|
843
|
+
if (currentType.value === ImageType.SHAPE) {
|
|
844
|
+
const idx = defaultShapes
|
|
845
|
+
.map(({ value }) => value)
|
|
846
|
+
.findIndex((i) => isEqualShape(localValue.value, i));
|
|
847
|
+
// select custom (index 7), if no defaultShape found
|
|
848
|
+
selectedIdx.value = idx < 0 ? 7 : idx;
|
|
902
849
|
} else if (currentType.value === ImageType.ICON) {
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
850
|
+
selectedIdx.value = props.iconOptions.findIndex(
|
|
851
|
+
(i) => i.src === localValue.value.src,
|
|
852
|
+
);
|
|
906
853
|
}
|
|
907
854
|
},
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
if (selectedType.value === ImageType.SHAPE) {
|
|
911
|
-
const switchFromICON = currentType.value === ImageType.ICON;
|
|
912
|
-
let newPreset;
|
|
913
|
-
if (value === customIcon && !switchFromICON) {
|
|
914
|
-
return;
|
|
915
|
-
} else if (value === customIcon) {
|
|
916
|
-
newPreset = defaultShapes[0];
|
|
917
|
-
} else {
|
|
918
|
-
newPreset = defaultShapes.find((preset) => preset.src === value);
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
if (newPreset) {
|
|
922
|
-
let fill;
|
|
923
|
-
let stroke;
|
|
855
|
+
{ deep: true },
|
|
856
|
+
);
|
|
924
857
|
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
858
|
+
watch(selectedIdx, (idx) => {
|
|
859
|
+
// update modelValue on selection
|
|
860
|
+
if (idx > -1) {
|
|
861
|
+
if (
|
|
862
|
+
selectedType.value === ImageType.SHAPE &&
|
|
863
|
+
idx < defaultShapes.length
|
|
864
|
+
) {
|
|
865
|
+
const switchFromICON = currentType.value === ImageType.ICON;
|
|
866
|
+
localValue.value = {
|
|
867
|
+
...defaultShapes[idx]?.value,
|
|
868
|
+
fill: switchFromICON
|
|
869
|
+
? props.valueDefault?.fill
|
|
870
|
+
: toRaw(localValue.value?.fill),
|
|
871
|
+
stroke: switchFromICON
|
|
872
|
+
? props.valueDefault?.stroke
|
|
873
|
+
: toRaw(localValue.value?.stroke),
|
|
874
|
+
};
|
|
938
875
|
} else if (selectedType.value === ImageType.ICON) {
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
opacity: selectedOpacity.value || 1,
|
|
943
|
-
});
|
|
876
|
+
localValue.value = {
|
|
877
|
+
...props.iconOptions[idx],
|
|
878
|
+
};
|
|
944
879
|
}
|
|
945
|
-
|
|
946
|
-
},
|
|
880
|
+
}
|
|
947
881
|
});
|
|
948
882
|
|
|
949
883
|
const currentItems = computed(() => {
|
|
@@ -956,15 +890,18 @@
|
|
|
956
890
|
} else if (selectedType.value === ImageType.ICON) {
|
|
957
891
|
items = props.iconOptions;
|
|
958
892
|
}
|
|
959
|
-
return items
|
|
893
|
+
return items.map(({ src }, idx) => ({
|
|
894
|
+
src,
|
|
895
|
+
idx,
|
|
896
|
+
}));
|
|
960
897
|
});
|
|
961
898
|
|
|
962
899
|
onMounted(() => {
|
|
963
|
-
drawImageStyle(canvas.value,
|
|
900
|
+
drawImageStyle(canvas.value, localValue.value);
|
|
964
901
|
watch(
|
|
965
|
-
|
|
902
|
+
localValue,
|
|
966
903
|
() => {
|
|
967
|
-
drawImageStyle(canvas.value,
|
|
904
|
+
drawImageStyle(canvas.value, localValue.value);
|
|
968
905
|
},
|
|
969
906
|
{ deep: true },
|
|
970
907
|
);
|
|
@@ -972,15 +909,13 @@
|
|
|
972
909
|
|
|
973
910
|
return {
|
|
974
911
|
ImageType,
|
|
912
|
+
localValue,
|
|
975
913
|
selectedType,
|
|
976
914
|
currentType,
|
|
977
|
-
|
|
915
|
+
selectedIdx,
|
|
978
916
|
canvas,
|
|
979
917
|
shapeSingleValueInputs,
|
|
980
918
|
selectedScale,
|
|
981
|
-
selectedOpacity,
|
|
982
|
-
selectedFill,
|
|
983
|
-
selectedStroke,
|
|
984
919
|
between,
|
|
985
920
|
currentItems,
|
|
986
921
|
selectedImageTypeTab,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Draws an image style on a canvas.
|
|
3
3
|
* @param {HTMLCanvasElement} canvas The canvas to draw on
|
|
4
|
-
* @param {import("ol/style/Image").Options} imageOptions The JSON options of the image style.
|
|
5
|
-
* @param {boolean} fitToCanvas If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
|
|
4
|
+
* @param {import("ol/style/Image").Options} [imageOptions] The JSON options of the image style.
|
|
5
|
+
* @param {boolean} [fitToCanvas=false] If the circle, shape or icon should be fitted into the canvas or if it should be draw with it's actual size.
|
|
6
6
|
*/
|
|
7
|
-
export function drawImageStyle(canvas: HTMLCanvasElement, imageOptions
|
|
7
|
+
export function drawImageStyle(canvas: HTMLCanvasElement, imageOptions?: import("ol/style/Image", { with: { "resolution-mode": "import" } }).Options | undefined, fitToCanvas?: boolean | undefined): Promise<void>;
|
|
8
8
|
/**
|
|
9
9
|
* *
|
|
10
10
|
*/
|
|
@@ -80,23 +80,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
80
80
|
SHAPE: string;
|
|
81
81
|
ICON: string;
|
|
82
82
|
};
|
|
83
|
+
localValue: import("vue").Ref<any>;
|
|
83
84
|
selectedType: import("vue").ComputedRef<string>;
|
|
84
85
|
currentType: import("vue").ComputedRef<string | undefined>;
|
|
85
|
-
|
|
86
|
+
selectedIdx: import("vue").Ref<number>;
|
|
86
87
|
canvas: import("vue").Ref<any>;
|
|
87
|
-
shapeSingleValueInputs: import("vue").ComputedRef<{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
unit
|
|
91
|
-
range
|
|
92
|
-
|
|
93
|
-
}[]>;
|
|
88
|
+
shapeSingleValueInputs: import("vue").ComputedRef<[{
|
|
89
|
+
key: string;
|
|
90
|
+
isRequired?: boolean | undefined;
|
|
91
|
+
unit?: string | undefined;
|
|
92
|
+
range?: number[] | undefined;
|
|
93
|
+
}]>;
|
|
94
94
|
selectedScale: import("vue").WritableComputedRef<any>;
|
|
95
|
-
selectedOpacity: import("vue").WritableComputedRef<unknown>;
|
|
96
|
-
selectedFill: import("vue").WritableComputedRef<unknown>;
|
|
97
|
-
selectedStroke: import("vue").WritableComputedRef<unknown>;
|
|
98
95
|
between: typeof between;
|
|
99
|
-
currentItems: import("vue").ComputedRef<
|
|
96
|
+
currentItems: import("vue").ComputedRef<{
|
|
97
|
+
src: any;
|
|
98
|
+
idx: number;
|
|
99
|
+
}[]>;
|
|
100
100
|
selectedImageTypeTab: import("vue").Ref<number>;
|
|
101
101
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
102
102
|
modelValue: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<MenuWrapper
|
|
3
|
-
v-bind="{ ...$attrs, value, valueDefault, disabled }"
|
|
4
3
|
:value-fallback="{ color: [0, 0, 0, 1], width: 1 }"
|
|
5
4
|
name="components.style.stroke"
|
|
5
|
+
v-bind="{ ...$attrs, ...$props }"
|
|
6
6
|
>
|
|
7
7
|
<template #preview>
|
|
8
8
|
<v-sheet
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
/>
|
|
16
16
|
</template>
|
|
17
17
|
<template #content>
|
|
18
|
-
<VcsStrokeSelector
|
|
18
|
+
<VcsStrokeSelector v-bind="{ ...$attrs, ...$props }" />
|
|
19
19
|
</template>
|
|
20
20
|
</MenuWrapper>
|
|
21
21
|
</template>
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
<script>
|
|
24
24
|
import { computed } from 'vue';
|
|
25
25
|
import { VSheet } from 'vuetify/components';
|
|
26
|
+
import { useProxiedAtomicModel } from '../modelHelper.js';
|
|
26
27
|
import VcsStrokeSelector from './VcsStrokeSelector.vue';
|
|
27
28
|
import MenuWrapper from './MenuWrapper.vue';
|
|
28
29
|
import { useColorObject, rgbaObjectToString } from './composables.js';
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* @description A wrapper for the VcsStrokeSelector, that has a small color preview and a menu that pops up when clicking the preview, containing the stroke selector.
|
|
32
|
-
* When clicking the reset button, the valueDefault is emitted, when unchecking the checkbox in front of the preview, null is emitted.
|
|
33
|
+
* When clicking the reset button, the valueDefault is emitted, when unchecking the checkbox in front of the preview, null is emitted.
|
|
34
|
+
* If it is checked again, valueDefault is emitted. If the valueDefault is undefined or null, { color: [0, 0, 0, 1], width: 1 } is emitted.
|
|
33
35
|
* @vue-prop {import("ol/style/Stroke").Options} [modelValue] - The Stroke Options
|
|
34
|
-
* @vue-prop {import("ol/style/Stroke").Options} [valueDefault] - The default Stroke Options.
|
|
35
|
-
* @vue-prop {boolean} [disabled=false] - Disable the input
|
|
36
36
|
*/
|
|
37
37
|
export default {
|
|
38
38
|
name: 'VcsStrokeMenu',
|
|
@@ -46,17 +46,10 @@
|
|
|
46
46
|
type: Object,
|
|
47
47
|
default: undefined,
|
|
48
48
|
},
|
|
49
|
-
valueDefault: {
|
|
50
|
-
type: Object,
|
|
51
|
-
default: undefined,
|
|
52
|
-
},
|
|
53
|
-
disabled: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
49
|
},
|
|
58
|
-
setup(props) {
|
|
59
|
-
const
|
|
50
|
+
setup(props, { emit }) {
|
|
51
|
+
const localValue = useProxiedAtomicModel(props, 'modelValue', emit);
|
|
52
|
+
const rgbaObject = useColorObject(() => localValue.value?.color);
|
|
60
53
|
return {
|
|
61
54
|
rgbaString: computed(() => rgbaObjectToString(rgbaObject.value)),
|
|
62
55
|
};
|
|
@@ -3,14 +3,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
type: ObjectConstructor;
|
|
4
4
|
default: undefined;
|
|
5
5
|
};
|
|
6
|
-
valueDefault: {
|
|
7
|
-
type: ObjectConstructor;
|
|
8
|
-
default: undefined;
|
|
9
|
-
};
|
|
10
|
-
disabled: {
|
|
11
|
-
type: BooleanConstructor;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
6
|
}, {
|
|
15
7
|
rgbaString: import("vue").ComputedRef<string>;
|
|
16
8
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -18,17 +10,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
10
|
type: ObjectConstructor;
|
|
19
11
|
default: undefined;
|
|
20
12
|
};
|
|
21
|
-
valueDefault: {
|
|
22
|
-
type: ObjectConstructor;
|
|
23
|
-
default: undefined;
|
|
24
|
-
};
|
|
25
|
-
disabled: {
|
|
26
|
-
type: BooleanConstructor;
|
|
27
|
-
default: boolean;
|
|
28
|
-
};
|
|
29
13
|
}>>, {
|
|
30
|
-
disabled: boolean;
|
|
31
14
|
modelValue: Record<string, any>;
|
|
32
|
-
valueDefault: Record<string, any>;
|
|
33
15
|
}, {}>;
|
|
34
16
|
export default _default;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:hide-spin-buttons="true"
|
|
15
15
|
type="number"
|
|
16
16
|
unit="px"
|
|
17
|
-
:disabled="!
|
|
17
|
+
:disabled="!modelValue"
|
|
18
18
|
/>
|
|
19
19
|
</v-col>
|
|
20
20
|
</v-row>
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
:model-value="rgbaObject"
|
|
24
24
|
@update:model-value="updateColor"
|
|
25
25
|
mode="rgba"
|
|
26
|
-
:disabled="!
|
|
26
|
+
:disabled="!modelValue"
|
|
27
|
+
width="100%"
|
|
27
28
|
/>
|
|
28
29
|
</v-sheet>
|
|
29
30
|
</template>
|
|
@@ -40,10 +41,11 @@
|
|
|
40
41
|
import VcsLabel from '../form-inputs-controls/VcsLabel.vue';
|
|
41
42
|
import VcsTextField from '../form-inputs-controls/VcsTextField.vue';
|
|
42
43
|
import { useColorObject } from './composables.js';
|
|
44
|
+
import { useProxiedComplexModel } from '../modelHelper.js';
|
|
43
45
|
|
|
44
46
|
/**
|
|
45
47
|
* @description Allows to model a JSON representation of ol/Stroke vector style with a vuetify VColorPicker.
|
|
46
|
-
* @vue-prop {import("ol/style/Stroke").Options}
|
|
48
|
+
* @vue-prop {import("ol/style/Stroke").Options} [modelValue] - The Stroke Options
|
|
47
49
|
*/
|
|
48
50
|
export default {
|
|
49
51
|
name: 'VcsFillSelector',
|
|
@@ -63,30 +65,21 @@
|
|
|
63
65
|
},
|
|
64
66
|
},
|
|
65
67
|
setup(props, { emit }) {
|
|
68
|
+
const localValue = useProxiedComplexModel(props, 'modelValue', emit);
|
|
66
69
|
return {
|
|
67
|
-
rgbaObject: useColorObject(() =>
|
|
70
|
+
rgbaObject: useColorObject(() => localValue.value?.color),
|
|
68
71
|
width: computed({
|
|
69
72
|
get() {
|
|
70
|
-
return
|
|
73
|
+
return localValue.value?.width;
|
|
71
74
|
},
|
|
72
75
|
set(value) {
|
|
73
|
-
if (value > 0 && value !==
|
|
74
|
-
|
|
75
|
-
width: value,
|
|
76
|
-
};
|
|
77
|
-
if (props.modelValue?.color) {
|
|
78
|
-
stroke.color = [...props.modelValue.color];
|
|
79
|
-
}
|
|
80
|
-
emit('update:modelValue', stroke);
|
|
76
|
+
if (value > 0 && value !== localValue.value?.width) {
|
|
77
|
+
localValue.value.width = value;
|
|
81
78
|
}
|
|
82
79
|
},
|
|
83
80
|
}),
|
|
84
81
|
updateColor(rgba) {
|
|
85
|
-
|
|
86
|
-
color: [rgba.r, rgba.g, rgba.b, rgba.a],
|
|
87
|
-
width: props.modelValue?.width,
|
|
88
|
-
};
|
|
89
|
-
emit('update:modelValue', stroke);
|
|
82
|
+
localValue.value.color = [rgba.r, rgba.g, rgba.b, rgba.a];
|
|
90
83
|
},
|
|
91
84
|
};
|
|
92
85
|
},
|