img-mapper/react-img-mapper

OnClick event for areas does not work.

GydoZajkowski opened this issue · 1 comments

I'm trying to implement this package. I don't want to go to a url when I click on the area but I want a modal to open.
I tried this by implementing the standard image map with html etc and this works fine. Since i want the image map to be responsive I wanted to use this pacakage. The responsive feature works great but the onClick doesn't work. Even if I add a simple console log to the onClick nothing happens.

To reproduce, add a onClick property on the ImageMapper component. Click on the area, nothing happens.

Also I can't find a demo which uses the onClick.

The problem was that I didn't define a name for the map only the areas.