Escape key closes detail panel and range circle
This commit is contained in:
parent
8c45125e7c
commit
d9b309ac6d
1 changed files with 13 additions and 0 deletions
|
|
@ -533,6 +533,19 @@ export const PropagationMap = {
|
|||
L.DomEvent.disableScrollPropagation(this.timelineEl)
|
||||
}
|
||||
|
||||
// Escape key closes detail panel and range circles
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Escape") {
|
||||
if (this.detailPanel) {
|
||||
this.detailPanel.style.display = "none"
|
||||
this.detailPanel.innerHTML = ""
|
||||
}
|
||||
this.rangeCircles.clearLayers()
|
||||
this.clickedLatLng = null
|
||||
this.lastDetail = null
|
||||
}
|
||||
})
|
||||
|
||||
this.el.addEventListener("show-loading", () => topbar.show(300))
|
||||
|
||||
this.sendBounds()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue