Skip to content
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

Added wrapper function for mouseover, mouseenter, and mouseleave #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

QuiWorks
Copy link

Fixes #90, fixes #65 by creating three new functions mouseenter(node, xy), mouseleave(node, xy), and mouseover(node, xy) that wrap the makeMouseEvent(eventName, xy, node) function.

…), and mouseover(node, xy) that wrap the makeMouseEvent(eventName, xy, node) function. Wrote unit test for the new functions.
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@QuiWorks
Copy link
Author

QuiWorks commented Dec 21, 2017 via email

Copy link
Member

@valdrinkoshi valdrinkoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mouseenter and mouseleave have a "complex" behavior (see comments), this should probably be handled here.
Also, what about mouseout? https://developer.mozilla.org/en-US/docs/Web/Events/mouseout

@@ -1,2 +1,3 @@
bower_components*
bower-*.json
.idea/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not needed here

}

/**
* Fires a `mouseenter` mouse event on a specific node, at a given set of coordinates.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be "Fires a mouseover mouse event" here

/**
/**
* Fires a `mouseenter` mouse event on a specific node, at a given set of coordinates.
* This event bubbles and is cancellable. If the (x,y) coordinates are
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mouseenter doesn't bubble and is not cancellable.
Also, it should fire a separate event for each parent up to <body> - see https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter. Do we expect this to be done here or by the user?


/**
* Fires a `mouseleave` mouse event on a specific node, at a given set of coordinates.
* This event bubbles and is cancellable. If the (x,y) coordinates are
Copy link
Member

@valdrinkoshi valdrinkoshi Mar 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly to mouseenter, mouseleave doesn't bubble and is not cancellable.
Also, it should fire a separate event for each parent up to <body> - see https://developer.mozilla.org/en-US/docs/Web/Events/mouseleave. Do we expect this to be done here or by the user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for mouseenter and mouseleave events Add support for mouseover event.
4 participants