Skip to content

Commit

Permalink
fix: Margin in highlight function when based on radius should be half…
Browse files Browse the repository at this point in the history
… the size (#1006)
  • Loading branch information
claustres committed Dec 6, 2024
1 parent 61e232e commit b08e1a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion map/client/composables/highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit b08e1a4

Please sign in to comment.