-
Notifications
You must be signed in to change notification settings - Fork 25
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
bower_components* | ||
bower-*.json | ||
.idea/ | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -240,7 +240,46 @@ | |
makeMouseEvent('mouseup', xy, node); | ||
} | ||
|
||
/** | ||
/** | ||
* 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
* not specified, the middle of the node will be used instead. | ||
* | ||
* @param {!Element} node The node to fire the event on. | ||
* @param {{ x: number, y: number }=} xy Optional. The (x,y) coordinates the mouse event should be fired from. | ||
*/ | ||
function mouseenter(node, xy) { | ||
xy = xy || middleOfNode(node); | ||
makeMouseEvent('mouseenter', xy, node); | ||
} | ||
|
||
/** | ||
* Fires a `mouseenter` mouse event on a specific node, at a given set of coordinates. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be "Fires a |
||
* This event bubbles and is cancellable. If the (x,y) coordinates are | ||
* not specified, the middle of the node will be used instead. | ||
* | ||
* @param {!Element} node The node to fire the event on. | ||
* @param {{ x: number, y: number }=} xy Optional. The (x,y) coordinates the mouse event should be fired from. | ||
*/ | ||
function mouseover(node, xy) { | ||
xy = xy || middleOfNode(node); | ||
makeMouseEvent('mouseover', xy, node); | ||
} | ||
|
||
/** | ||
* 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly to |
||
* not specified, the middle of the node will be used instead. | ||
* | ||
* @param {!Element} node The node to fire the event on. | ||
* @param {{ x: number, y: number }=} xy Optional. The (x,y) coordinates the mouse event should be fired from. | ||
*/ | ||
function mouseleave(node, xy) { | ||
xy = xy || middleOfNode(node); | ||
makeMouseEvent('mouseleave', xy, node); | ||
} | ||
|
||
/** | ||
* Generate a click event on a given node, optionally at a given coordinate. | ||
* @param {!Element} node The node to fire the click event on. | ||
* @param {{ x: number, y: number }=} xy Optional. The (x,y) coordinates the mouse event should | ||
|
@@ -466,6 +505,9 @@ | |
scope.down = down; | ||
scope.up = up; | ||
scope.downAndUp = downAndUp; | ||
scope.mouseenter = mouseenter; | ||
scope.mouseleave = mouseleave; | ||
scope.mouseover = mouseover; | ||
scope.tap = tap; | ||
scope.move = move; | ||
scope.touchstart = touchstart; | ||
|
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.
this is not needed here