-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
got D3 map objects to pan correctly #925
Conversation
Thanks @CameronDevine - I believe we're making progress here. The d3 transmissions and demes (circles) seem to be generally in-sync now (tested about 5 times on different datasets), including after panning & zooming. However the map-panes are now consistently out-of-sync, including on a fresh load (i.e. no pan/zoom of the map), which could cause spurious interpretations of a saved SVG (the current auspice release is only "wrong" after panning/zooming). This is #429 (or a variant of that issue), which I suggest we work towards fixing on top of this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous message
@jameshadfield I have not been able to exactly reproduce your results. I get something that is also wrong, but in a different way.
Does this vary between OSs/Browsers? I am running Chrome 80.0 on Ubuntu Mate 18.04. I have not extensively tested with Firefox (version 73.0), but from a couple tests the results seem to be the same. Also, I have been using the command |
Could be browser specific, but I really hope not! I generally use Firefox. |
After looking into this a little more, it appears this is also a problem with the mapbox/leaflet-image library. It seems to create an image of the wrong area of the map in certain cases. Unfortunately, it appears that the leaflet-image library is no longer maintained (last commit in 2017), so either forking the library or finding another solution may be necessary. |
@jameshadfield I have a potential solution to both this issue, and #429, on my |
Thanks @CameronDevine -- I'll try to test this ASAP Update: apologies for not being able to test/merge this yet |
Hey @CameronDevine -- I've managed to test this a bit now it's much better than current master, and
|
Not sure why this didn't close. Merged in eb2fd3f |
To fix the issue of demes and transmissions not being translated correctly (#450) I set the
x
andy
coordinates of thepanels.mapD3
object to the same values as the map tiles. I then surrounded the D3 SVG output in an SVG group which translates everything to match the current view. This does nothing to fix #429.