mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: deactivate contextmenu and shortcuts in map preview
Contextmenu and keyboard shortcuts open controls, which are not fully initiated when in mode `noControl`, which is the case for preview.
This commit is contained in:
parent
2ca6ffd5ca
commit
e7ed14f216
1 changed files with 9 additions and 7 deletions
|
@ -191,15 +191,17 @@ U.Map = L.Map.extend({
|
|||
this.renderEditToolbar()
|
||||
}
|
||||
|
||||
this.initShortcuts()
|
||||
if (!this.options.noControl) this.initCaptionBar()
|
||||
this.onceDataLoaded(this.setViewFromQueryString)
|
||||
if (!this.options.noControl) {
|
||||
this.initShortcuts()
|
||||
this.initCaptionBar()
|
||||
this.on('contextmenu', this.onContextMenu)
|
||||
this.onceDataLoaded(this.setViewFromQueryString)
|
||||
this.on('click', this.closeInplaceToolbar)
|
||||
this.propagate()
|
||||
}
|
||||
|
||||
window.onbeforeunload = () => (this.editEnabled && this.isDirty) || null
|
||||
this.backup()
|
||||
this.on('click', this.closeInplaceToolbar)
|
||||
this.on('contextmenu', this.onContextMenu)
|
||||
this.propagate()
|
||||
},
|
||||
|
||||
initSyncEngine: async function () {
|
||||
|
@ -1752,7 +1754,7 @@ U.Map = L.Map.extend({
|
|||
},
|
||||
{
|
||||
label: this.help.displayLabel('SEARCH'),
|
||||
action: () => this.search(event),
|
||||
action: () => this.search(),
|
||||
}
|
||||
)
|
||||
if (this.options.urls.routing) {
|
||||
|
|
Loading…
Reference in a new issue