-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
attempt to address regressions from #1684, #1745 #1826
Conversation
That looks great, exactly what I had in mind, that loops in |
Thanks, this is awesome. I had just noticed a few issues with left right calculations and this seems to fix them for me. |
In my case it doesn't fix the offset, now i've got an offset on south instead of north :p I'll post a fiddle as soon as their site will be available. More infos about it, the offset is now equal to the scroll offset of the window. Here is quick made exemple (just pasted the leaflet dist script with patch applied in the head) : If you click on the map a marker is added : at the right position if the window scroll is at top / at the wrong position if the window scroll is at bottom. |
Ah, yah, I also have problems, but only when the page is scrolled. ( i had to resize the example above so it would scroll and then scroll down) |
So changing:
to
Fixes the scroll issue for me. I've forked the jsbin above to show the fix here: http://jsbin.com/etonoh/2/ (Scroll to bottom, I just overrode the one function.) I'll make a pull request to scooterw to add this fix |
Nice one @jec006 this fix the bug with my layout :) |
I will take a look. I do see where the change proposed by @jec006 fixes the issue when scroll is applied. Thanks! I will do some further testing, as I tend to overlook earlier IE versions that are still technically supported by Leaflet. |
Fix issue with mouse position when page is scrolled
Tested (with scroll fix from @jec006) on: OS X: Firefox, Chrome, Safari I can also fire up a Linux machine and test there if necessary. |
Ok on Ubuntu 13.04 with Firefox 22, Opera 12.16 & Chromium 28.0.1500.52 |
Awesome, thanks a lot! |
This pull request eliminates the need to call L.DomUtil.getViewportOffset(). The test suites run successfully, and I do not see any regressions in the major browsers.
I did not remove L.DomUtil.getViewportOffset() and its tests in this pull request. That is a decision better made by others.
This attempts to address regressions from #1684 and #1745 .