echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Feature] When Symbol is SVG, make the area of the symbol clickable, no just the SVG paths

Open ayashjorden opened this issue 3 years ago • 0 comments

What problem does this feature solve?

When Symbol is SVG, only the SVG paths will generate a click event. so the User need to be precise in order to click on a node. The area between the paths is not clickable. image

For example, when the above SVG is used as a graph node symbol, only the black lines that outline the lightbulb are clickable, and the area between them does not generate a click event.

What does the proposed API look like?

Suggested is to augment the Symbol attributes with SymbolMask: 'match' | 'square' | 'none', where:

  • match will make the whole SVG clickable, tracking the outline shape perimeter
  • square will create a square clickable area around the shape perimeter
  • none (or undefined or not-set) - events will fire only when clicking the paths

ayashjorden avatar Sep 16 '22 04:09 ayashjorden