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 (#2199)
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:
commit
b7ee50980f
1 changed files with 9 additions and 7 deletions
|
@ -191,15 +191,17 @@ U.Map = L.Map.extend({
|
||||||
this.renderEditToolbar()
|
this.renderEditToolbar()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.options.noControl) {
|
||||||
this.initShortcuts()
|
this.initShortcuts()
|
||||||
if (!this.options.noControl) this.initCaptionBar()
|
this.initCaptionBar()
|
||||||
|
this.on('contextmenu', this.onContextMenu)
|
||||||
this.onceDataLoaded(this.setViewFromQueryString)
|
this.onceDataLoaded(this.setViewFromQueryString)
|
||||||
|
this.on('click', this.closeInplaceToolbar)
|
||||||
|
this.propagate()
|
||||||
|
}
|
||||||
|
|
||||||
window.onbeforeunload = () => (this.editEnabled && this.isDirty) || null
|
window.onbeforeunload = () => (this.editEnabled && this.isDirty) || null
|
||||||
this.backup()
|
this.backup()
|
||||||
this.on('click', this.closeInplaceToolbar)
|
|
||||||
this.on('contextmenu', this.onContextMenu)
|
|
||||||
this.propagate()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initSyncEngine: async function () {
|
initSyncEngine: async function () {
|
||||||
|
@ -1752,7 +1754,7 @@ U.Map = L.Map.extend({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: this.help.displayLabel('SEARCH'),
|
label: this.help.displayLabel('SEARCH'),
|
||||||
action: () => this.search(event),
|
action: () => this.search(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if (this.options.urls.routing) {
|
if (this.options.urls.routing) {
|
||||||
|
|
Loading…
Reference in a new issue