From b08e1a459de88d88842c5be26a48f6300a95d409 Mon Sep 17 00:00:00 2001 From: Luc Claustres Date: Fri, 6 Dec 2024 13:43:16 +0100 Subject: [PATCH] fix: Margin in highlight function when based on radius should be half the size (#1006) --- map/client/composables/highlight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map/client/composables/highlight.js b/map/client/composables/highlight.js index 991c5eea1..e009f77eb 100644 --- a/map/client/composables/highlight.js +++ b/map/client/composables/highlight.js @@ -106,7 +106,7 @@ export function useHighlight (name, options = {}) { } } // If highlight size is based on a shape with a radius use it, otherwise go for size - if (radius) Object.assign(highlightStyle, { radius: radius + HighlightMargin }) + if (radius) Object.assign(highlightStyle, { radius: radius + 0.5 * HighlightMargin }) else if (size) Object.assign(highlightStyle, { size: [size[0] + HighlightMargin, size[1] + HighlightMargin] }) } Object.assign(highlight, { style: highlightStyle })