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

[docsprint] Add example to MapMouseEvent #9595

Merged
merged 3 commits into from
Apr 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/ui/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,27 @@ import type LngLat from '../geo/lng_lat';
/**
* `MapMouseEvent` is the event type for mouse-related map events.
* @extends {Object}
* @example
* // The `click` event is an example of a `MapMouseEvent`.
* // Set up an event listener on the map.
* map.on('click', function(e) {
* // The event object (`e`) contains information like the
* // coordinates of the point on the map that was clicked.
* console.log('A click event has occurred at ' + e.lngLat);
* });
*/
export class MapMouseEvent extends Event {
/**
* The event type.
* The event type (one of [`mousedown`](#map.event:mousedown),
* [`mouseup`](#map.event:mouseup),
* [`click`](#map.event:click),
* [`dblclick`](#map.event:dblclick),
* [`mousemove`](#map.event:mousemove),
* [`mouseover`](#map.event:mouseover),
* [`mouseenter`](#map.event:mouseenter),
* [`mouseleave`](#map.event:mouseleave),
* [`mouseout`](#map.event:mouseout),
* [`contextmenu`](#map.event:contextmenu)).
*/
type: 'mousedown'
| 'mouseup'
Expand Down