Avoid context menu for long tap when editing on mobile

This commit is contained in:
Andreas Hocevar
2018-01-14 23:11:43 +01:00
parent fa75b78bf9
commit 6bb88026ea
4 changed files with 10 additions and 5 deletions
+4
View File
@@ -267,6 +267,8 @@ const PluggableMap = function(options) {
*/
this.keyHandlerKeys_ = null;
_ol_events_.listen(this.viewport_, EventType.CONTEXTMENU,
this.handleBrowserEvent, this);
_ol_events_.listen(this.viewport_, EventType.WHEEL,
this.handleBrowserEvent, this);
_ol_events_.listen(this.viewport_, EventType.MOUSEWHEEL,
@@ -491,6 +493,8 @@ PluggableMap.prototype.addOverlayInternal_ = function(overlay) {
*/
PluggableMap.prototype.disposeInternal = function() {
this.mapBrowserEventHandler_.dispose();
_ol_events_.unlisten(this.viewport_, EventType.CONTEXTMENU,
this.handleBrowserEvent, this);
_ol_events_.unlisten(this.viewport_, EventType.WHEEL,
this.handleBrowserEvent, this);
_ol_events_.unlisten(this.viewport_, EventType.MOUSEWHEEL,