Lets say we have an element <div>
and above that element we have image png or svg code. If that png or svg have empty spots, how can we let clicks pass to the div
element? And to complicate that even more, in fact i have canvas below the png or svg which have to be handled, so <label>
will not solve the issue.
Asked
Active
Viewed 28 times
0

Honchar Denys
- 1,408
- 4
- 29
- 54
-
You might try an imagemap. I don't know how they handle open spaces in the map. Also, you could break the image down to a collection of images so that there literally *are* gaps that the click event will "pass through" – theGleep Oct 05 '17 at 22:05
-
1For SVG, see [Passing Mouse Events through SVG Background](https://stackoverflow.com/questions/46534633#46535144). I fear that will not work for PNG. – ccprog Oct 05 '17 at 23:34
-
After long experience, i do agree with you. – Honchar Denys Oct 27 '17 at 06:14