We have some SVG icons in our nodes, but it seems that they’re only clickable when the mouse is over the “lines” of the SVG, meaning that some parts of the icon are not clickable at all… this makes the experience of clicking an icon not very ideal.
Is there anything we can do to avoid this behaviour? Should we wrap it somehow with other component that will have the click event attached to it?
Yes, I am using go.Shape. I have tried adding the background, but makes no difference. Since I am no SVG expert, I’m wondering if the icon itself is causing any issue, but happens with any icon from icomoon.
For instance, the “copy” icon, I need to click the edges of the sheet to trigger the click event…
Hmmm, I assume you mean that mouse events occur in all of the filled areas of the Shape, not just the stroked lines, yes? That is the correct behavior. However, setting the background to a non-null value doesn’t seem to make the whole rectangular area responsive to mouse events. We’ll investigate.
In the meantime you can use a “transparent” background on something behind the Shape.