From 3d805c38d9849071e95bcf05ad64bfa259652a5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Or=C5=82=C3=B3w?= <adrian.orlow@fishbrain.com> Date: Thu, 28 Mar 2024 10:53:43 +0100 Subject: [PATCH] feat: make inactive pins colors different by type --- .../utils/config/pinsLayer/getBioEntitySingleFeature.test.ts | 2 +- .../utils/config/pinsLayer/getBioEntitySingleFeature.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.test.ts b/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.test.ts index 0b8e0270..2455acf1 100644 --- a/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.test.ts +++ b/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.test.ts @@ -84,7 +84,7 @@ describe('getBioEntitySingleFeature - subUtil', () => { }); expect(getPinStyleSpy).toHaveBeenCalledWith({ - color: addAlphaToHexString(PINS_COLORS.bioEntity, 0.5), + color: addAlphaToHexString(PINS_COLORS[type], 0.5), value, textColor: addAlphaToHexString(TEXT_COLOR, 0.5), }); diff --git a/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.ts b/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.ts index cdb44412..0bdc00fb 100644 --- a/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.ts +++ b/src/components/Map/MapViewer/utils/config/pinsLayer/getBioEntitySingleFeature.ts @@ -25,7 +25,7 @@ export const getBioEntitySingleFeature = ( ): Feature => { const color = isActive ? PINS_COLORS[type] - : addAlphaToHexString(PINS_COLORS.bioEntity, INACTIVE_ELEMENT_OPACITY); + : addAlphaToHexString(PINS_COLORS[type], INACTIVE_ELEMENT_OPACITY); const textColor = isActive ? TEXT_COLOR -- GitLab