Skip to content

copy current mouse coords to over handler event#49

Merged
usmonster merged 1 commit intobriancherne:masterfrom
usmonster:11-copy-current-mouse-coordinates
Nov 22, 2015
Merged

copy current mouse coords to over handler event#49
usmonster merged 1 commit intobriancherne:masterfrom
usmonster:11-copy-current-mouse-coordinates

Conversation

@usmonster
Copy link
Collaborator

This overwrites the pageX and pageX properties of the mouse event passed
to the over handler with the coordinates obtained from the most recent
tracked mousemove. This is usually more useful than the possibly-stale
coordinates of the pointer at "mouseenter" time.

Thisi change may break compatibility with any handler that expects the
original coordinates, though these are still available on the
event.originalEvent.

Closes #11.

This overwrites the pageX and pageX properties of the mouse event passed
to the `over` handler with the coordinates obtained from the most recent
tracked mousemove. This is usually more useful than the possibly-stale
coordinates of the pointer at "mouseenter" time.

Thisi change may break compatibility with any handler that expects the
original coordinates, though these are still available on the
event.originalEvent.

Closes briancherne#11.
@usmonster usmonster added this to the v1.9.0 milestone Nov 22, 2015
usmonster added a commit that referenced this pull request Nov 22, 2015
copy current mouse coords to `over` handler event
@usmonster usmonster merged commit 46277f2 into briancherne:master Nov 22, 2015
@usmonster
Copy link
Collaborator Author

Note that this doesn't update the coordinates sent in the mouseout event that is passed to the out handler.

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.

1 participant