From 66dde2a9e9f16cfa252167ad8be1a93dfc3863b0 Mon Sep 17 00:00:00 2001 From: Johann Levesque Date: Fri, 25 Oct 2024 15:45:13 -0400 Subject: [PATCH] fix(ui): Toggle class visibility, legend class border and wms stack icon Closes #2550, #2565, #2556 --- .../public/locales/en/translation.json | 1 + .../public/locales/fr/translation.json | 1 + .../core/components/common/layer-icon-style.ts | 2 ++ .../src/core/components/common/layer-icon.tsx | 4 ++-- .../layers/right-panel/layer-details-style.ts | 1 + .../layers/right-panel/layer-details.tsx | 15 +++++++++++---- .../src/core/components/legend/legend-layer.tsx | 2 +- .../src/core/components/legend/legend-styles.ts | 7 +++++-- 8 files changed, 24 insertions(+), 9 deletions(-) diff --git a/packages/geoview-core/public/locales/en/translation.json b/packages/geoview-core/public/locales/en/translation.json index 63a4b5e634a..5898d347359 100644 --- a/packages/geoview-core/public/locales/en/translation.json +++ b/packages/geoview-core/public/locales/en/translation.json @@ -113,6 +113,7 @@ "reloadLayer": "Reload layer", "visibilityIsAlways": "Visibility is always enabled", "toggleVisibility": "Toggle visibility", + "toggleAllVisibility": "Toggle all visibility", "toggleCollapse": "Toggle collapse", "querying": "Querying", "layerAdded": "Layer __param__ added", diff --git a/packages/geoview-core/public/locales/fr/translation.json b/packages/geoview-core/public/locales/fr/translation.json index 48440f01909..6aac062092c 100644 --- a/packages/geoview-core/public/locales/fr/translation.json +++ b/packages/geoview-core/public/locales/fr/translation.json @@ -113,6 +113,7 @@ "reloadLayer": "Recharger la couche", "visibilityIsAlways": "La visibilité est toujours activée", "toggleVisibility": "Basculer la visibilité", + "toggleAllVisibility": "Basculer toute les visibilités", "toggleCollapse": "Basculer la fermeture", "querying": "Requête en cours", "layerAdded": "Couche __param__ ajoutée", diff --git a/packages/geoview-core/src/core/components/common/layer-icon-style.ts b/packages/geoview-core/src/core/components/common/layer-icon-style.ts index 7bb964cb81d..574f15eee2d 100644 --- a/packages/geoview-core/src/core/components/common/layer-icon-style.ts +++ b/packages/geoview-core/src/core/components/common/layer-icon-style.ts @@ -37,6 +37,8 @@ export const getSxClasses = (theme: Theme): any => ({ maxIconImg: { maxWidth: 24, maxHeight: 24, + padding: 1, + height: 'auto !important', // Make sure the WMS image is not duplicated to fill the 100% height from parent }, legendIcon: { display: 'flex', diff --git a/packages/geoview-core/src/core/components/common/layer-icon.tsx b/packages/geoview-core/src/core/components/common/layer-icon.tsx index 618ff2ae91d..1c007808f79 100644 --- a/packages/geoview-core/src/core/components/common/layer-icon.tsx +++ b/packages/geoview-core/src/core/components/common/layer-icon.tsx @@ -50,7 +50,7 @@ function IconStack({ layerPath, onIconClick, onStackIconClick }: TypeIconStackPr } if (numOfIcons && numOfIcons > 0) { return ( - onStackIconClick?.(e)} aria-hidden="true"> + onStackIconClick?.(e)} aria-hidden="true">