Skip to content

Fix issue with mouse position when page is scrolled#1

Merged
scooterw merged 1 commit intoscooterw:fix_mouse_position_relativefrom
jec006:fix_mouse_position_relative
Jul 5, 2013
Merged

Fix issue with mouse position when page is scrolled#1
scooterw merged 1 commit intoscooterw:fix_mouse_position_relativefrom
jec006:fix_mouse_position_relative

Conversation

@jec006
Copy link
Copy Markdown

@jec006 jec006 commented Jul 5, 2013

This deals with an issue where the mouse position is off by the scroll amount when the document is scrolled.

I simply switched the scroll from being added to the client to being subtracted from the page, since we're now always using the client offset.

See Leaflet#1826
and
http://jsbin.com/etonoh/2 vs http://jsbin.com/etonoh/1

scooterw pushed a commit that referenced this pull request Jul 5, 2013
Fix issue with mouse position when page is scrolled
@scooterw scooterw merged commit 4e2a7f2 into scooterw:fix_mouse_position_relative Jul 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants