MapBrowserEvent#preventDefault() behaves the same as with native events

This commit is contained in:
Andreas Hocevar
2021-04-05 10:04:20 +02:00
parent 1cb89ab991
commit 0da0c903a0
5 changed files with 14 additions and 8 deletions
+8 -2
View File
@@ -22,6 +22,11 @@ class BaseEvent {
*/
this.propagationStopped;
/**
* @type {boolean}
*/
this.defaultPrevented;
/**
* The event type.
* @type {string}
@@ -38,11 +43,12 @@ class BaseEvent {
}
/**
* Stop event propagation.
* Prevent default. This means that no emulated `click`, `singleclick` or `doubleclick` events
* will be fired.
* @api
*/
preventDefault() {
this.propagationStopped = true;
this.defaultPrevented = true;
}
/**