Also store pixel position in state.mousePosition#1211
Also store pixel position in state.mousePosition#1211mbarto merged 2 commits intogeosolutions-it:masterfrom
Conversation
| y: pos.lat, | ||
| crs: "EPSG:4326" | ||
| crs: "EPSG:4326", | ||
| pixel: event.containerPoint |
There was a problem hiding this comment.
I would copy coordinates also in this case, instead of storing Leaflet objects
There was a problem hiding this comment.
Should I also change other places in the leaflet/Map.jsx which use event.containerPoint (and even event.latlng), i.e. in the singleclick or contextmenu handlers?
There was a problem hiding this comment.
it would be useful, but only if it doesn't take you too much time
There was a problem hiding this comment.
That's the smaller part, the bigger part is figuring out how to write a useful test about this ;)
83d6ad3 to
21fe12f
Compare
|
I haven't found a way to add a sensible test for this. I suppose a proper test would be simulating a mouse move event and checking that the i.e. mouseMove event handler gets called with object one expects. However I can't find a way to simulate a mousemove event, below does not work: |
Useful i.e. to display a hover tooltip in an "on-the-fly" identify mode.