diff --git a/common/changes/@visactor/vrender-components/fix-legend-bounds-padding_2024-09-25-11-05.json b/common/changes/@visactor/vrender-components/fix-legend-bounds-padding_2024-09-25-11-05.json new file mode 100644 index 000000000..7b863f35b --- /dev/null +++ b/common/changes/@visactor/vrender-components/fix-legend-bounds-padding_2024-09-25-11-05.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fix `boundsPadding` of legend focus icon\n\n", + "type": "none", + "packageName": "@visactor/vrender-components" + } + ], + "packageName": "@visactor/vrender-components", + "email": "dingling112@gmail.com" +} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-core/fix-legend-bounds-padding_2024-09-25-11-05.json b/common/changes/@visactor/vrender-core/fix-legend-bounds-padding_2024-09-25-11-05.json new file mode 100644 index 000000000..d9847ec34 --- /dev/null +++ b/common/changes/@visactor/vrender-core/fix-legend-bounds-padding_2024-09-25-11-05.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fix `boundsPadding` of legend focus icon\n\n", + "type": "none", + "packageName": "@visactor/vrender-core" + } + ], + "packageName": "@visactor/vrender-core", + "email": "dingling112@gmail.com" +} \ No newline at end of file diff --git a/packages/vrender-components/src/legend/discrete/discrete.ts b/packages/vrender-components/src/legend/discrete/discrete.ts index fd0ba8330..9bec57ce2 100644 --- a/packages/vrender-components/src/legend/discrete/discrete.ts +++ b/packages/vrender-components/src/legend/discrete/discrete.ts @@ -556,10 +556,10 @@ export class DiscreteLegend extends LegendBase { x: 0, y: -focusSize / 2 - 1, strokeBoundsBuffer: 0, + boundsPadding: parsedPadding, ...focusIconStyle, visible: true, - pickMode: 'imprecise', - boundsPadding: parsedPadding + pickMode: 'imprecise' }); this._appendDataToShape(focusShape, LEGEND_ELEMENT_NAME.focus, item, itemGroup);