@vcmap/ui 5.0.0-rc.11 → 5.0.0-rc.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/build/build.js +6 -0
  2. package/build/buildHelpers.js +12 -3
  3. package/build/getPluginProxies.js +4 -0
  4. package/config/base.config.json +310 -156
  5. package/config/dev.config.json +211 -6
  6. package/dist/assets/{cesium.e67536.js → cesium.4057e6.js} +0 -0
  7. package/dist/assets/cesium.js +1 -1
  8. package/dist/assets/{core.ebf665.js → core.deb2b7.js} +1 -1
  9. package/dist/assets/core.js +1 -1
  10. package/dist/assets/font/OFL.txt +93 -0
  11. package/dist/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  12. package/dist/assets/{index.9b213929.js → index.7aa11f5a.js} +1 -1
  13. package/dist/assets/{ol.8bbd50.js → ol.70b137.js} +0 -0
  14. package/dist/assets/ol.js +1 -1
  15. package/dist/assets/ui.9eb282.css +1 -0
  16. package/dist/assets/{ui.fdfe0d.js → ui.9eb282.js} +42 -40
  17. package/dist/assets/ui.js +1 -1
  18. package/dist/assets/{vue.0bb7c6.js → vue.65d93f.js} +0 -0
  19. package/dist/assets/vue.js +2 -2
  20. package/dist/assets/{vuetify.53300f.css → vuetify.149dde.css} +1 -1
  21. package/dist/assets/{vuetify.53300f.js → vuetify.149dde.js} +3 -3
  22. package/dist/assets/vuetify.js +2 -2
  23. package/dist/index.html +1 -5
  24. package/index.js +2 -0
  25. package/package.json +1 -1
  26. package/plugins/@vcmap/pluginExample/index.js +1 -1
  27. package/plugins/test/index.js +1 -4
  28. package/src/application/VcsApp.vue +100 -24
  29. package/src/assets/font/OFL.txt +93 -0
  30. package/src/assets/font/TitilliumWeb-Regular.woff2 +0 -0
  31. package/src/components/lists/VcsTreeviewLeaf.vue +1 -1
  32. package/src/i18n/de.js +6 -0
  33. package/src/i18n/en.js +6 -0
  34. package/src/icons/+all.js +80 -0
  35. package/src/icons/ClippingHorizontalIcon.vue +7 -0
  36. package/src/icons/ClippingIcon.vue +7 -0
  37. package/src/icons/ClippingVerticalIcon.vue +7 -0
  38. package/src/icons/ColorPickerIcon.vue +7 -0
  39. package/src/icons/ComponentsIcon.vue +2 -2
  40. package/src/icons/DimensionsHouseIcon.vue +11 -9
  41. package/src/icons/EditIcon.vue +7 -0
  42. package/src/icons/GlobalTerrainIcon.vue +9 -0
  43. package/src/icons/GroundIcon.vue +18 -0
  44. package/src/icons/HideIcon.vue +12 -0
  45. package/src/icons/LogoutIcon.vue +7 -0
  46. package/src/icons/ObjectAttributeIcon.vue +2 -13
  47. package/src/icons/PedestrianIcon.vue +2 -3
  48. package/src/icons/PenIcon.vue +2 -9
  49. package/src/icons/PoiIcon.vue +5 -2
  50. package/src/icons/PointSelectIcon.vue +4 -2
  51. package/src/icons/QueryIcon.vue +6 -7
  52. package/src/icons/ScreenshotIcon.vue +16 -0
  53. package/src/icons/ShareIcon.vue +4 -16
  54. package/src/icons/SkipNextIcon.vue +3 -1
  55. package/src/icons/TerrainBoxIcon.vue +9 -0
  56. package/src/icons/ToolsIcon.vue +4 -30
  57. package/src/icons/UploadIcon.vue +2 -9
  58. package/src/icons/UserProfileIcon.vue +7 -0
  59. package/src/icons/UserShareIcon.vue +7 -0
  60. package/src/icons/VideoRecorderIcon.vue +5 -9
  61. package/src/icons/ViewpointFlightIcon.vue +11 -0
  62. package/src/icons/ViewpointIcon.vue +11 -0
  63. package/src/icons/Viewshed360Icon.vue +7 -0
  64. package/src/icons/ViewshedConeIcon.vue +7 -0
  65. package/src/icons/ViewshedIcon.vue +7 -0
  66. package/src/icons/WallIcon.vue +4 -9
  67. package/src/legend/legendHelper.js +193 -0
  68. package/src/legend/styleLegendItem.vue +129 -0
  69. package/src/legend/vcsLegend.vue +92 -0
  70. package/src/manager/toolbox/ToolboxGroupComponent.vue +7 -3
  71. package/src/manager/toolbox/ToolboxManager.vue +2 -1
  72. package/src/pluginHelper.js +42 -10
  73. package/src/styles/variables.scss +7 -0
  74. package/src/styles/vcsFont.scss +17 -0
  75. package/src/vcsUiApp.js +2 -1
  76. package/dist/assets/ui.fdfe0d.css +0 -1
@@ -1,21 +1,9 @@
1
1
  <!-- eslint-disable max-len -->
2
2
  <template>
3
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="22.584" viewBox="0 0 16 22.584">
4
- <defs>
5
- <clipPath id="clip-path">
6
- <rect
7
- id="Rectangle_795"
8
- data-name="Rectangle 795"
9
- width="16"
10
- height="22.584"
11
- transform="translate(0 0)"
12
- fill="currentColor"
13
- />
14
- </clipPath>
15
- </defs>
16
- <g id="Group_1050" data-name="Group 1050" transform="translate(0 0)" clip-path="url(#clip-path)">
17
- <path id="Path_490" data-name="Path 490" d="M13,7.584H10.687v2H13a1,1,0,0,1,1,1v9a1,1,0,0,1-1,1H3a1,1,0,0,1-1-1v-9a1,1,0,0,1,1-1H5.114v-2H3a3,3,0,0,0-3,3v9a3,3,0,0,0,3,3H13a3,3,0,0,0,3-3v-9a3,3,0,0,0-3-3" fill="currentColor" />
18
- <path id="Path_491" data-name="Path 491" d="M4.465,5.947,7,3.412V13.584a.963.963,0,0,0,.066.322.985.985,0,0,0,.881.667c.018,0,.034.011.053.011a1,1,0,0,0,1-1V3.411l2.536,2.536A1,1,0,1,0,12.95,4.533L8.708.29C8.7.283,8.691.281,8.684.275A1,1,0,0,0,7.294.29L3.051,4.533A1,1,0,0,0,4.465,5.947" fill="currentColor" />
3
+ <svg id="icon_24_share" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <g id="Gruppe_1962" transform="translate(-694 -537.56)">
5
+ <path id="Pfad_745" d="M712,547h-3v2h2v9H701v-9h2v-2h-3a1,1,0,0,0-1,1v11a1,1,0,0,0,1,1h12a1,1,0,0,0,1-1V548A1,1,0,0,0,712,547Z" fill="currentColor" />
6
+ <path id="Pfad_746" d="M702,545.021a1,1,0,0,0,.707-.292L705,542.435V550a1,1,0,0,0,2,0v-7.37l2.293,2.293a1,1,0,1,0,1.414-1.414l-3.9-3.9a1.146,1.146,0,0,0-.118-.078.9.9,0,0,0-.078-.116,1,1,0,0,0-1.414,0l-3.9,3.9a1,1,0,0,0,.707,1.707Z" fill="currentColor" />
19
7
  </g>
20
8
  </svg>
21
9
  </template>
@@ -2,6 +2,8 @@
2
2
 
3
3
  <template>
4
4
  <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10">
5
- <path id="Path_92" data-name="Path 92" d="M7,15.377a1,1,0,0,0,1.669.744l3.753-3.378a1,1,0,0,0,.075-1.412q-.036-.039-.075-.075L8.67,7.878A1,1,0,0,0,7,8.622ZM14,8v8a1,1,0,0,0,1,1h1a1,1,0,0,0,1-1V8a1,1,0,0,0-1-1H15A1,1,0,0,0,14,8Z" transform="translate(-7 -7)" fill="currentColor" />
5
+ <g id="streamline-icon-button-previous_24x24" transform="translate(-7 -7)">
6
+ <path id="Pfad_92" d="M7,15.377a1,1,0,0,0,1.669.744l3.753-3.378a1,1,0,0,0,.075-1.412q-.036-.039-.075-.075L8.67,7.878A1,1,0,0,0,7,8.622ZM14,8v8a1,1,0,0,0,1,1h1a1,1,0,0,0,1-1V8a1,1,0,0,0-1-1H15A1,1,0,0,0,14,8Z" fill="currentColor" />
7
+ </g>
6
8
  </svg>
7
9
  </template>
@@ -0,0 +1,9 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
+ <g id="Gruppe_1899" transform="translate(-2000 -128)">
6
+ <path id="Pfad_721" d="M1144.555,583.9a.894.894,0,0,0,.031-.173.836.836,0,0,0,.008-.139,1,1,0,0,0-.032-.151.714.714,0,0,0-.055-.152.505.505,0,0,0-.018-.052.887.887,0,0,0-.065-.07.723.723,0,0,0-.112-.123.788.788,0,0,0-.134-.088.89.89,0,0,0-.083-.055l-11.2-4.48a.807.807,0,0,0-.6,0l-11.2,4.48a.6.6,0,0,0-.084.057.745.745,0,0,0-.131.084.769.769,0,0,0-.115.126.63.63,0,0,0-.063.068.478.478,0,0,0-.018.052.727.727,0,0,0-.055.152,1,1,0,0,0-.032.151.81.81,0,0,0,.008.139.9.9,0,0,0,.031.173c.007.016,0,.034.01.05s.034.047.049.075a.768.768,0,0,0,.1.146.793.793,0,0,0,.117.105.951.951,0,0,0,.075.068l6.148,3.688h0l5.051,3.03.013,0a.785.785,0,0,0,.807,0l.013,0,4.9-2.941,0,0,6.294-3.776.018-.016c.016-.011.028-.027.042-.039a.774.774,0,0,0,.242-.3c.008-.016.028-.024.034-.041S1144.549,583.919,1144.555,583.9Zm-21.343-.105,8.572-3.43v4.171l-4.189,1.89Zm14.245,2.711-4.053-1.956v-4.186l8.572,3.43Z" transform="translate(879.405 -444.361)" fill="currentColor" />
7
+ </g>
8
+ </svg>
9
+ </template>
@@ -1,35 +1,9 @@
1
1
  <!-- eslint-disable max-len -->
2
2
  <template>
3
- <svg>
4
- <rect id="size" width="24" height="24" fill="none" />
5
- <g id="Group_719" data-name="Group 719" transform="translate(-0.001)">
6
- <rect
7
- id="Rectangle_667"
8
- data-name="Rectangle 667"
9
- width="5"
10
- height="1"
11
- transform="translate(5.001 19)"
12
- fill="currentColor"
13
- />
14
- <rect
15
- id="Rectangle_668"
16
- data-name="Rectangle 668"
17
- width="2"
18
- height="10"
19
- transform="translate(8 8)"
20
- fill="currentColor"
21
- />
22
- <path id="Path_366" data-name="Path 366" d="M7.957,3.3a.5.5,0,0,0-.913,0L5.176,7H9.825Z" fill="currentColor" />
23
- <path id="Path_367" data-name="Path 367" d="M5,21.5a2.5,2.5,0,1,0,5,0V21H5v.5Z" fill="currentColor" />
24
- <rect
25
- id="Rectangle_669"
26
- data-name="Rectangle 669"
27
- width="2"
28
- height="10"
29
- transform="translate(5.001 8)"
30
- fill="currentColor"
31
- />
32
- <path id="Path_368" data-name="Path 368" d="M18.5,0h-6a.5.5,0,0,0-.5.5V3h2.5a.5.5,0,0,1,0,1H12V7h2.5a.5.5,0,0,1,0,1H12v3h2.5a.5.5,0,0,1,0,1H12v3h2.5a.5.5,0,0,1,0,1H12v3h2.5a.5.5,0,0,1,0,1H12v3.5a.5.5,0,0,0,.5.5h6a.5.5,0,0,0,.5-.5V.5A.5.5,0,0,0,18.5,0Z" fill="currentColor" />
3
+ <svg id="icon_24_tools" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <g id="Gruppe_1966" transform="translate(-500.726 -577.125)">
5
+ <path id="Pfad_763" d="M519,578h-6a1,1,0,0,0-1,1v20a1,1,0,0,0,1,1h6a1,1,0,0,0,1-1V579A1,1,0,0,0,519,578Zm-1,20h-4v-2h1a1,1,0,0,0,0-2h-1v-2h1a1,1,0,0,0,0-2h-1v-2h1a1,1,0,0,0,0-2h-1v-2h1a1,1,0,0,0,0-2h-1v-2h4Z" transform="translate(0.726 0.125)" fill="currentColor" />
6
+ <path id="Pfad_764" d="M507.363,580.719a1,1,0,0,0-1.827,0l-2,4.5a1,1,0,0,0-.086.406v11.5a3,3,0,0,0,6,0v-11.5a1,1,0,0,0-.087-.406Zm-1.913,6.9h2v7.511h-2Zm1-4.027.9,2.027h-1.8Zm0,14.538a1,1,0,0,1-1-1h2A1,1,0,0,1,506.45,598.125Z" transform="translate(0.275)" fill="currentColor" />
33
7
  </g>
34
8
  </svg>
35
9
  </template>
@@ -1,14 +1,7 @@
1
1
  <!-- eslint-disable max-len -->
2
2
 
3
3
  <template>
4
- <svg
5
- id="streamline-icon-cloud-upload_24x24_1_"
6
- data-name="streamline-icon-cloud-upload@24x24 (1)"
7
- xmlns="http://www.w3.org/2000/svg"
8
- width="25.717"
9
- height="24"
10
- viewBox="0 0 25.717 24"
11
- >
12
- <path id="Path_121" data-name="Path 121" d="M25.713,11.1a6.236,6.236,0,0,0-1.9-4.464,6.117,6.117,0,0,0-3.693-1.7.267.267,0,0,1-.2-.129A8.232,8.232,0,0,0,4.811,7.266a.268.268,0,0,1-.243.214A4.918,4.918,0,0,0,0,12.381,4.632,4.632,0,0,0,1.324,15.82,5.912,5.912,0,0,0,5.187,17.3a1.071,1.071,0,1,0-.032-2.143A3.525,3.525,0,0,1,2.828,14.3a2.544,2.544,0,0,1-.685-1.919A2.775,2.775,0,0,1,5.487,9.664,1.071,1.071,0,0,0,6.752,8.83a1.043,1.043,0,0,0,.02-.151A6.092,6.092,0,0,1,18.365,6.442a1.031,1.031,0,0,0,1.008.611,3.965,3.965,0,0,1,2.955,1.126A4.02,4.02,0,0,1,23.571,11.1a4.109,4.109,0,0,1-3.683,4.057,1.071,1.071,0,0,0,.141,2.134,1.018,1.018,0,0,0,.14-.01A6.221,6.221,0,0,0,25.713,11.1Zm-12.1-1.526a1.072,1.072,0,0,0-1.515,0l-3.75,3.75a1.071,1.071,0,0,0,.757,1.833h1.875a.266.266,0,0,1,.268.266v7.77a1.607,1.607,0,1,0,3.214,0V15.424a.266.266,0,0,1,.266-.268h1.877a1.071,1.071,0,0,0,.757-1.829Z" transform="translate(0.004 -0.799)" fill="currentColor" />
4
+ <svg id="icon_24_export" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
+ <path id="Pfad_592" d="M24,10.411a5.82,5.82,0,0,0-1.772-4.166A5.708,5.708,0,0,0,18.778,4.66a.249.249,0,0,1-.191-.12,7.683,7.683,0,0,0-14.1,2.294.25.25,0,0,1-.227.2A4.589,4.589,0,0,0,0,11.607a4.322,4.322,0,0,0,1.236,3.209A5.517,5.517,0,0,0,4.84,16.2a1,1,0,1,0-.03-2,3.29,3.29,0,0,1-2.172-.8A2.374,2.374,0,0,1,2,11.607,2.589,2.589,0,0,1,5.12,9.072,1,1,0,0,0,6.3,8.294a.974.974,0,0,0,.019-.141A5.685,5.685,0,0,1,17.138,6.065a.962.962,0,0,0,.941.57,3.7,3.7,0,0,1,2.758,1.051A3.751,3.751,0,0,1,22,10.411,3.834,3.834,0,0,1,18.559,14.2a1,1,0,0,0,.132,1.992.95.95,0,0,0,.131-.009A5.805,5.805,0,0,0,24,10.411ZM12.7,8.988a1,1,0,0,0-1.414,0l-3.5,3.5A1,1,0,0,0,8.5,14.2h1.75a.248.248,0,0,1,.25.248V21.7a1.5,1.5,0,0,0,3,0V14.448a.248.248,0,0,1,.248-.25H15.5a1,1,0,0,0,.707-1.707Z" transform="translate(0.004 0.193)" fill="currentColor" />
13
6
  </svg>
14
7
  </template>
@@ -0,0 +1,7 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg id="icon-profile" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
5
+ <path id="Vereinigungsmenge_60" d="M10931.333,16339.334a.333.333,0,0,1-.332-.332v-1.259a2.342,2.342,0,0,1,1.546-2.2l3.12-1.111v-1.472a4.628,4.628,0,0,1-1.648-4.048,3.038,3.038,0,0,0,1.566.418,3.663,3.663,0,0,0,2.489-1.033,2.285,2.285,0,0,0,1.952,1.091,4.388,4.388,0,0,0,1.3-.229,4.637,4.637,0,0,1-1.661,3.8v1.472l3.121,1.111a2.337,2.337,0,0,1,1.546,2.2V16339a.334.334,0,0,1-.332.332Zm7.049-11.785a.315.315,0,0,0-.3-.168.323.323,0,0,0-.286.18,2.756,2.756,0,0,1-2.215,1.107,2.6,2.6,0,0,1-1.456-.455,3.839,3.839,0,0,1,3.539-3.215,3.9,3.9,0,0,1,3.6,3.489c-.382.095-.722.181-.742.185a2.582,2.582,0,0,1-.492.052C10939.337,16328.724,10938.849,16328.364,10938.382,16327.549Z" transform="translate(-10929.668 -16324)" fill="currentColor" />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,7 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg id="icon-collaborator-share" xmlns="http://www.w3.org/2000/svg" width="16" height="16.007" viewBox="0 0 16 16.007">
5
+ <path id="Pfad_81" d="M9.167,9.333A2.761,2.761,0,0,1,10,9.463a.167.167,0,0,0,.133-.017l.709-.425a.167.167,0,0,0,.067-.206c-.025-.061-.051-.12-.08-.179-.359-.717-1.538-1.15-3.169-1.751l-.419-.153a.4.4,0,0,1-.092-.207,1.721,1.721,0,0,1,.039-.867,3.744,3.744,0,0,0,.977-2.876A2.559,2.559,0,0,0,5.667,0a2.567,2.567,0,0,0-2.5,2.783,3.737,3.737,0,0,0,.971,2.865,1.636,1.636,0,0,1,.049.877.405.405,0,0,1-.09.206l-.421.155C2.04,7.485.861,7.919.5,8.636A6.125,6.125,0,0,0,0,11a.333.333,0,0,0,.333.333H6.353a.168.168,0,0,0,.157-.111A2.825,2.825,0,0,1,9.167,9.333ZM16,14.167a1.827,1.827,0,0,0-3.091-1.326.168.168,0,0,1-.177.034l-1.63-.652a.167.167,0,0,1-.1-.145.931.931,0,0,0-.011-.108.164.164,0,0,1,.079-.165l1.893-1.139a.166.166,0,0,1,.18.006A1.813,1.813,0,0,0,14.167,11a1.833,1.833,0,1,0-1.833-1.833h0a1.616,1.616,0,0,0,.014.2.164.164,0,0,1-.079.165l-1.893,1.141a.166.166,0,0,1-.18-.006,1.809,1.809,0,0,0-1.029-.327,1.833,1.833,0,1,0,1.258,3.159.168.168,0,0,1,.177-.034l1.63.652a.167.167,0,0,1,.1.149A1.833,1.833,0,0,0,16,14.167Z" fill="currentColor" />
6
+ </svg>
7
+ </template>
@@ -1,14 +1,10 @@
1
1
  <!-- eslint-disable max-len -->
2
2
 
3
3
  <template>
4
- <svg
5
- id="streamline-icon-camera-studio_24x24"
6
- data-name="streamline-icon-camera-studio@24x24"
7
- xmlns="http://www.w3.org/2000/svg"
8
- width="24"
9
- height="20.999"
10
- viewBox="0 0 24 20.999"
11
- >
12
- <path id="Path_15" data-name="Path 15" d="M23.5,12.989a1.175,1.175,0,0,0-1.121-.066L19.653,14.06a.251.251,0,0,0-.154.231v5.416a.251.251,0,0,0,.154.231l2.73,1.137a1.154,1.154,0,0,0,1.122-.066A1.178,1.178,0,0,0,24,20V14A1.178,1.178,0,0,0,23.5,12.989ZM2.5,11.5h14A1.5,1.5,0,0,1,18,13v8a1.5,1.5,0,0,1-1.5,1.5H2.5A1.5,1.5,0,0,1,1,21V13A1.5,1.5,0,0,1,2.5,11.5Zm2-10A4.5,4.5,0,1,1,0,6,4.5,4.5,0,0,1,4.5,1.5Zm9,3a3,3,0,1,1-3,3A3,3,0,0,1,13.5,4.5Z" transform="translate(0 -1.5)" fill="currentColor" />
4
+ <svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
5
+ <g id="Gruppe_2012" transform="translate(-1592 -578)">
6
+ <path id="Pfad_791" d="M1614,591.174a2.154,2.154,0,0,0-.834-1.8l-.05-.035a1.975,1.975,0,0,0-1.962-.145l-2.17.973a2.409,2.409,0,0,0-.6-1.441,2.188,2.188,0,0,0-1.611-.727h-11.532a2.305,2.305,0,0,0-2.235,2.363v7.274a2.305,2.305,0,0,0,2.235,2.363h11.53a2.285,2.285,0,0,0,2.216-2.165l2.12.947a1.921,1.921,0,0,0,.892.218,2.075,2.075,0,0,0,1.171-.372,2.135,2.135,0,0,0,.835-1.761Zm-7,6.463c0,.208-.124.363-.235.363h-11.53c-.111,0-.235-.155-.235-.363v-7.274c0-.208.124-.363.235-.363h11.531a.187.187,0,0,1,.13.07.44.44,0,0,1,.1.293Zm4.97-.656L1610,596.1v-4.2l1.982-.894a.32.32,0,0,1,.017.127v5.769C1612,596.965,1611.974,597.019,1611.97,596.981Z" fill="currentColor" />
7
+ <path id="Pfad_792" d="M1601.215,585.665A3.494,3.494,0,1,0,1604.5,581h0a3.482,3.482,0,0,0-2.583,1.161,5,5,0,1,0-.7,3.5ZM1604.5,583a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,1604.5,583Zm-7.5,3a3,3,0,1,1,3-3A3,3,0,0,1,1597,586Z" fill="currentColor" />
8
+ </g>
13
9
  </svg>
14
10
  </template>
@@ -0,0 +1,11 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg id="icon_24_viewpoint-flight" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
+ <g id="Gruppe_2014" transform="translate(-698 -606)">
6
+ <path id="Pfad_802" d="M720.4,609.465a2.061,2.061,0,0,0-1.467-.611h-1l-.374-.373a1.635,1.635,0,0,0-1.163-.481h-1.788a1.636,1.636,0,0,0-1.164.482l-.371.372h-1A2.075,2.075,0,0,0,710,610.929v3.425a2.074,2.074,0,0,0,2.071,2.073h1.3l5.561,0A2.075,2.075,0,0,0,721,614.354v-3.422A2.056,2.056,0,0,0,720.4,609.465Zm-1.4,4.888a.072.072,0,0,1-.072.072l-6.857,0a.072.072,0,0,1-.071-.073v-3.427a.072.072,0,0,1,.071-.073h1.3a1.157,1.157,0,0,0,.877-.353l.5-.5h1.495l.5.5a1.209,1.209,0,0,0,.854.351h1.323a.081.081,0,0,1,.071.074Z" fill="currentColor" />
7
+ <path id="Pfad_803" d="M715.5,611.071a1.465,1.465,0,1,0,1.464,1.464A1.465,1.465,0,0,0,715.5,611.071Z" fill="currentColor" />
8
+ <path id="Pfad_804" d="M720,618h-6a1,1,0,0,0,0,2h2v2h-3.382a3.927,3.927,0,0,0-5.236,0H704v-2h2a1,1,0,0,0,0-2h-6a1,1,0,0,0,0,2h2v2a1,1,0,0,0,0,2h4.142a3.937,3.937,0,0,0-.142,1v2a1,1,0,0,0,2,0v-2a1.978,1.978,0,0,1,.278-1h3.444a1.978,1.978,0,0,1,.278,1v2a1,1,0,0,0,2,0v-2a3.937,3.937,0,0,0-.142-1H718a1,1,0,0,0,0-2v-2h2a1,1,0,0,0,0-2Z" fill="currentColor" />
9
+ </g>
10
+ </svg>
11
+ </template>
@@ -0,0 +1,11 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg id="icon_24_viewpoint-static" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
+ <g id="Gruppe_2013" transform="translate(-664 -604.83)">
6
+ <path id="Pfad_798" d="M676,610.232a3.884,3.884,0,1,0,3.884,3.884A3.889,3.889,0,0,0,676,610.232ZM676,616a1.884,1.884,0,1,1,1.884-1.884A1.886,1.886,0,0,1,676,616Z" fill="currentColor" />
7
+ <path id="Pfad_799" d="M684.153,609.205a2.883,2.883,0,0,0-2.058-.854H680l-.893-.892a2.163,2.163,0,0,0-1.517-.629h-3.18a2.16,2.16,0,0,0-1.517.63l-.89.891h-2.1A2.908,2.908,0,0,0,667,611.259v6.092a2.908,2.908,0,0,0,2.905,2.9h2.3l9.887,0a2.911,2.911,0,0,0,2.906-2.9v-6.09A2.886,2.886,0,0,0,684.153,609.205ZM683,617.349a.906.906,0,0,1-.906.9l-12.189,0a.905.905,0,0,1-.905-.9v-6.1a.905.905,0,0,1,.905-.9h2.341a1.556,1.556,0,0,0,.986-.4l1.075-1.076a.148.148,0,0,1,.1-.043h3.18a.145.145,0,0,1,.1.044l1.078,1.075a1.371,1.371,0,0,0,.973.4H682.1a.9.9,0,0,1,.639.265.9.9,0,0,1,.264.643Z" fill="currentColor" />
8
+ <path id="Pfad_800" d="M678.1,621h-3.843a1.466,1.466,0,0,0-1.2,2.311l3.119,4.424,3.12-4.424A1.467,1.467,0,0,0,678.1,621Zm-1.922,3.265L675.289,623h1.783Z" fill="currentColor" />
9
+ </g>
10
+ </svg>
11
+ </template>
@@ -0,0 +1,7 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg id="icon_24_viewshed_360" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
+ <path id="Vereinigungsmenge_64" d="M11218.5,13309.529c0-.3.01-.878,3-.981,0-.007,0-.014,0-.021v-6a1,1,0,0,1,2,0v6c0,.007,0,.014,0,.021,2.992.1,3,.685,3,.981,0,.324,0,1-4,1S11218.5,13309.854,11218.5,13309.529Zm-2.89-12.895a.733.733,0,0,1,0-.781,8.084,8.084,0,0,1,13.776,0,.738.738,0,0,1,0,.784,8.084,8.084,0,0,1-13.776,0Zm2.735-1.6a8.278,8.278,0,0,0-1.188,1.212,8.185,8.185,0,0,0,1.188,1.21,7.3,7.3,0,0,0,1.3.854,3.508,3.508,0,0,1,0-4.129A7.288,7.288,0,0,0,11218.348,13295.032Zm7.677,1.212a3.5,3.5,0,0,1-.668,2.062,7.226,7.226,0,0,0,1.289-.852,8.051,8.051,0,0,0,1.192-1.21,7.821,7.821,0,0,0-1.192-1.209,7.359,7.359,0,0,0-1.289-.855A3.5,3.5,0,0,1,11226.024,13296.244Zm-5.562,0a2.039,2.039,0,1,0,2.037-2.041A2.039,2.039,0,0,0,11220.463,13296.244Zm.929,0a1.12,1.12,0,0,1,1.349-1.085.6.6,0,0,0-.083.3.6.6,0,0,0,.922.518,1.115,1.115,0,0,1-1.079,1.373A1.108,1.108,0,0,1,11221.392,13296.244Z" transform="translate(-11210.5 -13288.027)" fill="currentColor" stroke="none" />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,7 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg id="icon_24_viewshed_cone" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
+ <path id="Pfad_797" d="M1099,464v-1a1,1,0,0,1,2,0v1a1,1,0,0,1-2,0Zm5.95,3.05a.993.993,0,0,0,.707-.293l.707-.707a1,1,0,1,0-1.414-1.414l-.707.707a1,1,0,0,0,.707,1.707Zm-9.193,8.193a1,1,0,0,0-1.414,0l-.707.707a1,1,0,1,0,1.414,1.414l.707-.707A1,1,0,0,0,1095.757,475.243ZM1108,470h-1a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Zm-14,1a1,1,0,0,0-1-1h-1a1,1,0,0,0,0,2h1A1,1,0,0,0,1094,471Zm11.657,4.243a1,1,0,0,0-1.414,1.414l.707.707a1,1,0,1,0,1.414-1.414Zm-11.314-8.486a1,1,0,1,0,1.414-1.414l-.707-.707a1,1,0,1,0-1.414,1.414ZM1096,471a4,4,0,1,1,4,4A4,4,0,0,1,1096,471Zm2,0a2,2,0,1,0,2-2A2,2,0,0,0,1098,471Zm3,10.018c0-.006,0-.012,0-.018v-4a1,1,0,0,0-2,0v4c0,.006,0,.012,0,.018-2.993.1-3,.687-3,.982,0,.325,0,1,4,1s4-.675,4-1C1104,481.7,1103.989,481.123,1101,481.018Zm8,1.982,1.732-3h-3.464Zm0-7-1.732,3h3.464Z" transform="translate(-1088 -460)" fill="currentColor" />
6
+ </svg>
7
+ </template>
@@ -0,0 +1,7 @@
1
+ <!-- eslint-disable max-len -->
2
+
3
+ <template>
4
+ <svg id="icon_24_viewshed" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
5
+ <path id="Vereinigungsmenge_63" d="M11153,13347a1,1,0,0,1-1-1v-5a1,1,0,0,1,1-1h3a1,1,0,0,1,1,1v5a1,1,0,0,1-1,1Zm1-2h1v-3h-1Zm-4.225-.145-7.018-4.244c-.1.135-.19.282-.3.409a6.143,6.143,0,0,1-1.179,1.008.513.513,0,0,1-.274.081.5.5,0,0,1-.419-.229.5.5,0,0,1,.147-.689,5.168,5.168,0,0,0,.981-.841c.073-.08.124-.174.19-.258l-1.42-.857a1,1,0,0,1-.482-.857v-2.82a1,1,0,0,1,.526-.878l1.4-.757a4.936,4.936,0,0,0-1.049-1.012.5.5,0,0,1,.576-.817,6.029,6.029,0,0,1,1.363,1.347l11.7-6.321a1,1,0,0,1,1.477.881v10a1,1,0,0,1-1,1h-3.705v5a1,1,0,0,1-1,1A1.022,1.022,0,0,1,11149.776,13344.856Zm-6.056-9.63a5.706,5.706,0,0,1-.03,3.611l5.6,3.39V13338a1,1,0,0,1,1-1H11154v-7.322Zm-1.722.932v1.657l.807.489a4.659,4.659,0,0,0,.021-2.593Zm-6,.84,2.636-1.43a3,3,0,0,1,.091,2.687Z" transform="translate(-11134 -13325)" fill="currentColor" stroke="none" />
6
+ </svg>
7
+ </template>
@@ -1,14 +1,9 @@
1
1
  <!-- eslint-disable max-len -->
2
2
  <template>
3
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.158" height="22" viewBox="0 0 20.158 22">
4
- <defs>
5
- <clipPath id="clip-path">
6
- <rect id="Rectangle_843" data-name="Rectangle 843" width="20.158" height="22" fill="currentColor" />
7
- </clipPath>
8
- </defs>
9
- <g id="Group_1440" data-name="Group 1440" clip-path="url(#clip-path)">
10
- <path id="Path_530" data-name="Path 530" d="M16.158,20h-3V2h3V7h2V1a1,1,0,0,0-1-1H12.593a1,1,0,0,0-.2.02L.805,2.33A1,1,0,0,0,0,3.311V15.864a1,1,0,0,0,.59.913L12,21.912a1,1,0,0,0,.41.088h4.745a1,1,0,0,0,1-1V15h-2ZM2,4.131l9.158-1.825V19.339L2,15.218Z" fill="currentColor" />
11
- <path id="Path_531" data-name="Path 531" d="M17.158,8a3,3,0,1,0,3,3,3,3,0,0,0-3-3" fill="currentColor" />
3
+ <svg id="icon_24_wall" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
4
+ <g id="Gruppe_1440" data-name="Gruppe 1440" transform="translate(3 1)">
5
+ <path id="Pfad_530" data-name="Pfad 530" d="M16.158,20h-3V2h3V7h2V1a1,1,0,0,0-1-1H12.593a1,1,0,0,0-.2.02L.805,2.33A1,1,0,0,0,0,3.311V15.864a1,1,0,0,0,.59.913L12,21.912a1,1,0,0,0,.41.088h4.745a1,1,0,0,0,1-1V15h-2ZM2,4.131l9.158-1.825V19.339L2,15.218Z" fill="currentColor" />
6
+ <path id="Pfad_531" data-name="Pfad 531" d="M17.158,8a3,3,0,1,0,3,3,3,3,0,0,0-3-3" fill="currentColor" />
12
7
  </g>
13
8
  </svg>
14
9
  </template>
@@ -0,0 +1,193 @@
1
+ import { getShapeFromOptions } from '@vcmap/core';
2
+ import Vue, { reactive } from 'vue';
3
+
4
+ /**
5
+ * @enum {string}
6
+ * @property {string} Image - an image
7
+ * @property {string} IFRAME - an iframe
8
+ * @property {string} Style - a parametric style element
9
+ */
10
+ export const LegendType = {
11
+ Image: 'ImageLegendItem',
12
+ Iframe: 'IframeLegendItem',
13
+ Style: 'StyleLegendItem',
14
+ };
15
+
16
+ /**
17
+ * @enum {string}
18
+ */
19
+ export const StyleRowType = {
20
+ Stroke: 'StrokeLegendRow',
21
+ Fill: 'FillLegendRow',
22
+ Circle: 'CircleLegendRow',
23
+ Icon: 'IconLegendRow',
24
+ Shape: 'RegularShapeLegendRow',
25
+ Text: 'TextLegendRow',
26
+ };
27
+
28
+ /**
29
+ * @typedef {Object} LegendItem
30
+ * @property {LegendType} type - determines rendering, specialised properties are type based.
31
+ */
32
+
33
+ /**
34
+ * @typedef {LegendItem} ImageLegendItem
35
+ * @property {boolean} [popoutBtn=false] - show a button in legend title to open legend in new tab
36
+ * @property {string} src - the source url. Can be an i18n string.
37
+ * @property {string} [tooltip] - Optional further explanation of the legend
38
+ */
39
+
40
+ /**
41
+ * @typedef {LegendItem} IframeLegendItem
42
+ * @property {boolean} [popoutBtn=false] - show a button in legend title to open legend in new tab
43
+ * @property {string} src - the source url. Can be an i18n string.
44
+ */
45
+
46
+
47
+ /**
48
+ * @typedef {LegendItem} StyleLegendItem
49
+ * @property {number} [colNr=2] Number of columns. Valid values are 1 or 2. Per default 2.
50
+ * @property {Array<StyleLegendRow>} rows - style definitions with description
51
+ */
52
+
53
+ /**
54
+ * @typedef {Object} StyleLegendRow
55
+ * @property {StyleRowType} type - determines rendering of the row, specialised properties are type based.
56
+ * @property {string} title - Description of the style. Can be an i18n string
57
+ * @property {string} [tooltip] - Optional further explanation of the legend row
58
+ */
59
+
60
+ /**
61
+ * @typedef {StyleLegendRow} StrokeLegendRow
62
+ * @property {import("ol/style/Stroke").Options} stroke
63
+ */
64
+
65
+ /**
66
+ * @typedef {StyleLegendRow} FillLegendRow
67
+ * @property {import("ol/style/Fill").Options} fill
68
+ * @property {import("ol/style/Stroke").Options} [stroke]
69
+ */
70
+
71
+ /**
72
+ * @typedef {StyleLegendRow} CircleLegendRow
73
+ * @property {import("ol/style/Circle").Options} image
74
+ */
75
+
76
+ /**
77
+ * @typedef {StyleLegendRow} IconLegendRow
78
+ * @property {import("ol/style/Icon").Options} image
79
+ */
80
+
81
+ /**
82
+ * @typedef {StyleLegendRow} RegularShapeLegendRow
83
+ * @property {import("ol/style/RegularShape").Options} image
84
+ */
85
+
86
+ /**
87
+ * @typedef {StyleLegendRow} TextLegendRow
88
+ * @property {import("ol/style/Text").Options} text
89
+ * @property {string} [label='Text']
90
+ */
91
+
92
+ /**
93
+ * @type {import("ol/style/Image").Options} image
94
+ * @return {string}
95
+ */
96
+ export function getImageSrcFromShape(image) {
97
+ if (image.src) {
98
+ return image.src;
99
+ }
100
+ const shape = getShapeFromOptions(image);
101
+ const imageRep = shape.getImage(1);
102
+ return imageRep.currentSrc || imageRep.toDataURL();
103
+ }
104
+
105
+ /**
106
+ * @typedef {Object} LegendEntry
107
+ * @property {string} title - layer or entry name
108
+ * @property {Array<LegendItem>} legend - legend properties
109
+ * @property {Array<VcsAction>} actions - popout actions
110
+ */
111
+
112
+ /**
113
+ * creates a LegendEntry with title, options and optionally popout action to the entries array
114
+ * @param {string} title
115
+ * @param {Array<LegendItem>} legend
116
+ * @returns {LegendEntry}
117
+ */
118
+ export function createLayerLegendEntry(title, legend) {
119
+ const actions = [];
120
+ legend.forEach((item) => {
121
+ // XXX only one popout button allowed. Rethink if use case for multiple popout buttons comes up.
122
+ if (item.src && item.popoutBtn && actions.length < 1) {
123
+ actions.push({
124
+ name: 'legendPopoutAction',
125
+ icon: 'mdi-open-in-new',
126
+ title: 'legend.openInNew',
127
+ callback: () => window.open(item.src, '_blank'),
128
+ });
129
+ }
130
+ });
131
+ return { title, legend, actions };
132
+ }
133
+
134
+ /**
135
+ *
136
+ * @param {VcsUiApp} app
137
+ * @returns {{entries: import("vue").Reactive<{string,LegendEntry}>, destroy: (function():void)}}
138
+ */
139
+ export function getLegendEntries(app) {
140
+ /**
141
+ * @type {import("vue").Reactive<{string,LegendEntry}>}
142
+ */
143
+ const entries = reactive({});
144
+ /**
145
+ * @type {Object<string,function():void>}
146
+ */
147
+ const styleChangedListener = {};
148
+
149
+ /**
150
+ * @param {import("@vcmap/core").Layer} layer
151
+ */
152
+ function removeEntryForLayer(layer) {
153
+ const key = layer.name;
154
+ Vue.delete(entries, key); // XXX Vue.delete can be removed on Vue3
155
+ if (styleChangedListener[key]) {
156
+ styleChangedListener[key]();
157
+ delete styleChangedListener[key];
158
+ }
159
+ }
160
+
161
+ /**
162
+ * adds or removes a LegendEntry on layer state changes and layer style changes
163
+ * adds a styleChangedListener for all layers changing its state
164
+ * @param {import("@vcmap/core").Layer} layer
165
+ */
166
+ function syncLayerLegendEntries(layer) {
167
+ removeEntryForLayer(layer);
168
+ if (layer.active) {
169
+ const key = layer.name;
170
+ const title = layer.properties.title || layer.name;
171
+ const legend = layer.style?.properties?.legend ?? layer.properties?.legend;
172
+ if (legend) {
173
+ Vue.set(entries, key, createLayerLegendEntry(title, legend)); // XXX Vue.set can be removed on Vue3
174
+ }
175
+ if (layer.styleChanged) {
176
+ styleChangedListener[layer.name] = layer.styleChanged.addEventListener(() => syncLayerLegendEntries(layer));
177
+ }
178
+ }
179
+ }
180
+
181
+ const destroyChangedListener = app.layers.stateChanged.addEventListener(syncLayerLegendEntries);
182
+ const destroyRemovedListener = app.layers.removed.addEventListener(removeEntryForLayer);
183
+
184
+ [...app.layers].forEach(syncLayerLegendEntries);
185
+
186
+ const destroy = () => {
187
+ destroyChangedListener();
188
+ destroyRemovedListener();
189
+ Object.values(styleChangedListener).forEach(cb => cb());
190
+ };
191
+
192
+ return { entries, destroy };
193
+ }
@@ -0,0 +1,129 @@
1
+ <template>
2
+ <v-list dense>
3
+ <v-layout wrap :column="item.colNr === 1">
4
+ <v-flex
5
+ v-for="(row, idx) in item.rows"
6
+ :key="idx"
7
+ :class="{ 'w-full': item.colNr === 1, 'w-half': item.colNr !== 1 }"
8
+ >
9
+ <v-list-item dense>
10
+ <v-list-item-icon class="pr-2">
11
+ <v-img
12
+ v-if="row.type === StyleRowType.Icon || row.type === StyleRowType.Shape"
13
+ width="32"
14
+ height="24"
15
+ contain
16
+ :src="getImageSrcFromShape(row.image)"
17
+ />
18
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="24" viewBox="0 0 32 24" v-else>
19
+ <text
20
+ v-if="row.type === StyleRowType.Text"
21
+ :style="`font:${row.text.font}`"
22
+ x="0"
23
+ y="17"
24
+ :stroke="getColor(row.text?.stroke?.color)"
25
+ :stroke-linecap="row.text?.stroke?.lineCap"
26
+ :stroke-linejoin="row.text?.stroke?.lineJoin"
27
+ :stroke-dasharray="row.text?.stroke?.lineDash"
28
+ :stroke-dashoffset="row.text?.stroke?.lineDashOffset"
29
+ :stroke-miterlimit="row.text?.stroke?.miterLimit"
30
+ :stroke-width="row.text?.stroke?.width"
31
+ :fill="getColor(row.text?.fill?.color) || 'rgba(255,255,255,0)'"
32
+ >
33
+ {{ $t(row.label || 'legend.defaultLabelText') }}
34
+ </text>
35
+ <line
36
+ v-else-if="row.type === StyleRowType.Stroke"
37
+ x1="0"
38
+ y1="12"
39
+ x2="32"
40
+ y2="12"
41
+ :stroke="getColor(row.stroke?.color)"
42
+ :stroke-linecap="row.stroke?.lineCap"
43
+ :stroke-linejoin="row.stroke?.lineJoin"
44
+ :stroke-dasharray="row.stroke?.lineDash"
45
+ :stroke-dashoffset="row.stroke?.lineDashOffset"
46
+ :stroke-miterlimit="row.stroke?.miterLimit"
47
+ :stroke-width="row.stroke?.width"
48
+ />
49
+ <rect
50
+ v-else-if="row.type === StyleRowType.Fill"
51
+ width="32"
52
+ height="24"
53
+ :stroke="getColor(row.stroke?.color)"
54
+ :stroke-linecap="row.stroke?.lineCap"
55
+ :stroke-linejoin="row.stroke?.lineJoin"
56
+ :stroke-dasharray="row.stroke?.lineDash"
57
+ :stroke-dashoffset="row.stroke?.lineDashOffset"
58
+ :stroke-miterlimit="row.stroke?.miterLimit"
59
+ :stroke-width="row.stroke?.width"
60
+ :fill="getColor(row.fill?.color) || 'rgba(255,255,255,0)'"
61
+ />
62
+ <circle
63
+ v-else-if="row.type === StyleRowType.Circle"
64
+ cx="16"
65
+ cy="12"
66
+ :r="row.image?.radius || 8"
67
+ :stroke="getColor(row.image?.stroke?.color)"
68
+ :stroke-linecap="row.image?.stroke?.lineCap"
69
+ :stroke-linejoin="row.image?.stroke?.lineJoin"
70
+ :stroke-dasharray="row.image?.stroke?.lineDash"
71
+ :stroke-dashoffset="row.image?.stroke?.lineDashOffset"
72
+ :stroke-miterlimit="row.image?.stroke?.miterLimit"
73
+ :stroke-width="row.image?.stroke?.width"
74
+ :fill="getColor(row.image?.fill?.color) || 'rgba(255,255,255,0)'"
75
+ />
76
+ </svg>
77
+ </v-list-item-icon>
78
+ <v-list-item-content>
79
+ <v-list-item-title
80
+ class="pt-2"
81
+ :title="$t(row.tooltip || row.title)"
82
+ >
83
+ {{ $t(row.title) }}
84
+ </v-list-item-title>
85
+ </v-list-item-content>
86
+ </v-list-item>
87
+ </v-flex>
88
+ </v-layout>
89
+ </v-list>
90
+ </template>
91
+
92
+ <script>
93
+
94
+ import { getStringColor } from '@vcmap/core';
95
+ import { StyleRowType, getImageSrcFromShape } from './legendHelper.js';
96
+
97
+ /**
98
+ * @description A component rendering vector styles as list using {@link https://vuetifyjs.com/en/api/v-list-row v-list-row}
99
+ * @vue-prop {StyleLegendItem} item - an item with multiple rows of style information and corresponding title
100
+ */
101
+ export default {
102
+ name: 'StyleLegendItem',
103
+ components: { },
104
+ props: {
105
+ item: {
106
+ type: Object,
107
+ required: true,
108
+ },
109
+ },
110
+ setup() {
111
+ return {
112
+ StyleRowType,
113
+ getImageSrcFromShape,
114
+ getColor(color) {
115
+ if (color) {
116
+ return getStringColor(color);
117
+ }
118
+ return null;
119
+ },
120
+ };
121
+ },
122
+ };
123
+ </script>
124
+
125
+ <style scoped>
126
+ .v-list-item--dense {
127
+ height: 32px;
128
+ }
129
+ </style>
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <v-card
3
+ class="overflow-y-auto"
4
+ max-height="500"
5
+ >
6
+ <v-expansion-panels
7
+ accordion
8
+ multiple
9
+ >
10
+ <v-expansion-panel
11
+ v-for="(entry,i) in entries"
12
+ :key="i"
13
+ class="pa-0 ma-0"
14
+ >
15
+ <v-expansion-panel-header hide-actions>
16
+ {{ $t(entry.title) }}
17
+ <template #default="{ open }">
18
+ <div class="d-flex">
19
+ <v-icon :class="{ 'v-treeview-node__toggle': !open }">
20
+ mdi-chevron-down
21
+ </v-icon>
22
+ <VcsTreeviewLeaf class="w-full" :item="entry" />
23
+ </div>
24
+ </template>
25
+ </v-expansion-panel-header>
26
+ <v-expansion-panel-content>
27
+ <v-list dense>
28
+ <div v-for="(item, idx) in entry.legend" :key="idx">
29
+ <div v-if="item.type === LegendType.Image" class="mx-2">
30
+ <v-img :src="$t(item.src)" max-width="287" class="mx-2" :title="item.tooltip" />
31
+ </div>
32
+ <div v-else-if="item.type === LegendType.Iframe" class="mx-2">
33
+ <iframe
34
+ :id="`legendIframe${idx}`"
35
+ :src="$t(item.src)"
36
+ scrolling="no"
37
+ width="287"
38
+ frameBorder="0"
39
+ @load="setIframeHeight(`legendIframe${idx}`)"
40
+ />
41
+ </div>
42
+ <style-legend-item v-else :item="item" class="mx-2" />
43
+ </div>
44
+ </v-list>
45
+ </v-expansion-panel-content>
46
+ </v-expansion-panel>
47
+ </v-expansion-panels>
48
+ </v-card>
49
+ </template>
50
+
51
+ <script>
52
+
53
+ import { LegendType } from './legendHelper.js';
54
+ import StyleLegendItem from './styleLegendItem.vue';
55
+ import VcsTreeviewLeaf from '../components/lists/VcsTreeviewLeaf.vue';
56
+
57
+ /**
58
+ * @description A component rendering configured legend information for active layers.
59
+ * @vue-prop {import("vue").Reactive<{string,LegendEntry}>} entries - legend entries to be displayed
60
+ */
61
+ export default {
62
+ name: 'VcsLegend',
63
+ components: { VcsTreeviewLeaf, StyleLegendItem },
64
+ props: {
65
+ entries: {
66
+ type: Object,
67
+ required: true,
68
+ },
69
+ },
70
+ setup() {
71
+ /**
72
+ * adapts the iframe height on load
73
+ * @param {string} id - iframe's html id
74
+ */
75
+ const setIframeHeight = (id) => {
76
+ const iframe = document.getElementById(id);
77
+ iframe.style.height = `${iframe.contentWindow.document.documentElement.scrollHeight}px`;
78
+ };
79
+
80
+ return {
81
+ LegendType,
82
+ setIframeHeight,
83
+ };
84
+ },
85
+ };
86
+ </script>
87
+
88
+ <style scoped>
89
+ .v-list-item--dense {
90
+ height: 32px;
91
+ }
92
+ </style>