summaryrefslogtreecommitdiffstats
path: root/debian/missing-sources/leaflet.js/layer/Layer.Interactive.leafdoc
blob: 11ed5a8cb22630d5151a9fab747fe3e626819e3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@class Interactive layer
@inherits Layer

Some `Layer`s can be made interactive - when the user interacts
with such a layer, mouse events like `click` and `mouseover` can be handled.
Use the [event handling methods](#evented-method) to handle these events.

@option interactive: Boolean = true
If `false`, the layer will not emit mouse events and will act as a part of the underlying map.

@option bubblingMouseEvents: Boolean = true
When `true`, a mouse event on this layer will trigger the same event on the map
(unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).

@section Mouse events

@event click: MouseEvent
Fired when the user clicks (or taps) the layer.

@event dblclick: MouseEvent
Fired when the user double-clicks (or double-taps) the layer.

@event mousedown: MouseEvent
Fired when the user pushes the mouse button on the layer.

@event mouseup: MouseEvent
Fired when the user releases the mouse button pushed on the layer.

@event mouseover: MouseEvent
Fired when the mouse enters the layer.

@event mouseout: MouseEvent
Fired when the mouse leaves the layer.

@event contextmenu: MouseEvent
Fired when the user right-clicks on the layer, prevents
default browser context menu from showing if there are listeners on
this event. Also fired on mobile when the user holds a single touch
for a second (also called long press).