From 55ee6bba0965a54edf5d02eebb6e5c42ec64141e Mon Sep 17 00:00:00 2001 From: jlpereira Date: Thu, 22 Jun 2023 13:11:20 -0300 Subject: [PATCH] Update DwC button, fix map label for aggregate maps, split nomenclature panels --- src/components/Map/utils/geojsonOptions.js | 41 ++++++----- src/modules/otus/components/DWCDownload.vue | 20 +++--- .../PanelNomenclature/PanelNomenclature.vue | 67 +++++++++++++++-- .../PanelNomenclatureCitations.vue | 71 ------------------- .../PanelNomenclatureReferences.vue | 20 +++--- .../PanelReferenceRow.vue | 0 src/modules/otus/constants/overviewLayout.js | 4 +- src/modules/otus/services/TaxonWorks.js | 4 -- 8 files changed, 112 insertions(+), 115 deletions(-) delete mode 100644 src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclatureCitations.vue rename src/modules/otus/components/Panel/{PanelNomenclature => PanelNomenclatureReferences}/PanelNomenclatureReferences.vue (75%) rename src/modules/otus/components/Panel/{PanelNomenclature => PanelNomenclatureReferences}/PanelReferenceRow.vue (100%) diff --git a/src/components/Map/utils/geojsonOptions.js b/src/components/Map/utils/geojsonOptions.js index 7c67716..a987194 100644 --- a/src/components/Map/utils/geojsonOptions.js +++ b/src/components/Map/utils/geojsonOptions.js @@ -27,23 +27,32 @@ function getRelevantType(base) { export default (L) => ({ onEachFeature: (feature, layer) => { + const labels = (feature.properties.base || []) + .map((item) => item.label) + .filter(Boolean) + + if (!labels.length) { + return + } + const label = ` -
-
` +
+ +
` layer.pm.setOptions(DEFAULT_OPTIONS) layer.pm.disable() diff --git a/src/modules/otus/components/DWCDownload.vue b/src/modules/otus/components/DWCDownload.vue index ae77638..7ec2a9f 100644 --- a/src/modules/otus/components/DWCDownload.vue +++ b/src/modules/otus/components/DWCDownload.vue @@ -2,7 +2,11 @@ DwC @@ -10,8 +14,7 @@ diff --git a/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclature.vue b/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclature.vue index 09e2f6f..f272516 100644 --- a/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclature.vue +++ b/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclature.vue @@ -1,12 +1,59 @@ diff --git a/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclatureCitations.vue b/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclatureCitations.vue deleted file mode 100644 index 22c5932..0000000 --- a/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclatureCitations.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - diff --git a/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclatureReferences.vue b/src/modules/otus/components/Panel/PanelNomenclatureReferences/PanelNomenclatureReferences.vue similarity index 75% rename from src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclatureReferences.vue rename to src/modules/otus/components/Panel/PanelNomenclatureReferences/PanelNomenclatureReferences.vue index d6f646d..774fc77 100644 --- a/src/modules/otus/components/Panel/PanelNomenclature/PanelNomenclatureReferences.vue +++ b/src/modules/otus/components/Panel/PanelNomenclatureReferences/PanelNomenclatureReferences.vue @@ -1,7 +1,9 @@