Closed baipi closed 8 years ago
@baipi thanks for the pull, I added a couple of comments. I thought the linter would catch a couple of these, but it did not, I tightened the eslint config to show the errors.
What happens if the users moves the mouse out of the map?
@jieter, thanks for the review, I will make changes soon.
If users move the mouse out of the map, the marker stays at the last mouse position on the map.
I see, I was asking because that might not be what we want: if the cursor is gone, the thing we use to mirror the cursor in the other map should be gone too.
I based the pull request on the issue #27, it doesn't really specify what should be comportment. The pull request is a first step which could be easily improve/adapt for user needs.
My quick implementation uses the mouseout event to hide the cursor: https://github.com/turban/Leaflet.Sync/blob/sync-cursor/L.Map.Sync.js#L46-L50
Hi @jieter, I made some changes yesturday. For now, I don't have time to implement and test the hidden cursor. Maybe it could be a part of a futur pull request ?
@baipi thanks. I needed to fix some things and it still needs tests and documenation...
27
Add synchronized circle marker cursors between synced maps to compare more accurately.