Skip to content

Commit

Permalink
Document mouseenter, mouseover, and mouseleave events
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Aug 10, 2017
1 parent 125ffb9 commit 8a68233
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion src/ui/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,39 @@ export type MapEvent =
*/
| 'dblclick'

/**
* Fired when a pointing device (usually a mouse) enters a visible portion of a specified layer from
* outside that layer or outside the map canvas. This event can only be listened for via the three-argument
* version of {@link Map#on}, where the second argument specifies the desired layer.
*
* @event mouseenter
* @memberof Map
* @instance
* @property {MapMouseEvent} data
*/
| 'mouseenter'

/**
* Fired when a pointing device (usually a mouse) leaves a visible portion of a specified layer, or leaves
* the map canvas. This event can only be listened for via the three-argument version of {@link Map#on},
* where the second argument specifies the desired layer.
*
* @event mouseleave
* @memberof Map
* @instance
* @property {MapMouseEvent} data
* @see [Highlight features under the mouse pointer](https://www.mapbox.com/mapbox-gl-js/example/hover-styles/)
*/
| 'mouseleave'

/**
* Synonym for `mouseenter`.
*
* @event mouseover
* @memberof Map
* @instance
* @property {MapMouseEvent} data
*/
| 'mouseover'

/**
Expand All @@ -173,7 +204,6 @@ export type MapEvent =
* @memberof Map
* @instance
* @property {MapMouseEvent} data
* @see [Highlight features under the mouse pointer](https://www.mapbox.com/mapbox-gl-js/example/hover-styles/)
*/
| 'mouseout'

Expand Down

0 comments on commit 8a68233

Please sign in to comment.