BlueMap

BlueMap

85.1k Downloads

Scroll-to-zoom does not work while hovering a marker

MauriceNino opened this issue ยท 2 comments

commented

What i did / Steps to reproduce

  1. Install BlueMap on a minecraft server
  2. Add markers to the map
  3. Open Map in browser
  4. Try to scroll while hovering a marker

Expected result

The map should still zoom

Actual result

The map doesn't zoom

Context

BlueMap Version:
3.13-spigot (MC 1.19.4)

Tested on Chrome, Edge and Firefox. Can be tested here.

commented

Only happens with POI/Html-Markers since they have the pointer-events: auto css property. They need this to be click-able.
Not sure if this is easily fixable, but i'll take a look..

commented

I have tried manually capturing the wheel event and passing it to the canvas, but no luck so far.

One solution that comes to my mind, would be to add pointer-events: none, and then add a global click event listener. You could then match the x/y coordinates of the click event to the x/y coordinates of the markers on screen.