Enable left-clicking on lines and areas again, fix #1231
This commit is contained in:
parent
6392585664
commit
009a1ccba6
2 changed files with 4 additions and 2 deletions
|
@ -404,7 +404,7 @@ export default class MinimapImplementation extends BaseUIElement implements Mini
|
||||||
|
|
||||||
if (this._options.lastClickLocation) {
|
if (this._options.lastClickLocation) {
|
||||||
const lastClickLocation = this._options.lastClickLocation
|
const lastClickLocation = this._options.lastClickLocation
|
||||||
map.on("click", function (e: LeafletMouseEvent) {
|
map.addEventListener("click", function (e: LeafletMouseEvent) {
|
||||||
if (e.originalEvent["dismissed"]) {
|
if (e.originalEvent["dismissed"]) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -340,6 +340,7 @@ export default class ShowDataLayerImplementation {
|
||||||
const self = this
|
const self = this
|
||||||
|
|
||||||
function activate(event: LeafletMouseEvent) {
|
function activate(event: LeafletMouseEvent) {
|
||||||
|
Utils.preventDefaultOnMouseEvent(event)
|
||||||
if (infobox === undefined) {
|
if (infobox === undefined) {
|
||||||
const tags =
|
const tags =
|
||||||
self.allElements?.getEventSourceById(key) ??
|
self.allElements?.getEventSourceById(key) ??
|
||||||
|
@ -383,8 +384,9 @@ export default class ShowDataLayerImplementation {
|
||||||
leafletLayer.on({
|
leafletLayer.on({
|
||||||
dblclick: activate,
|
dblclick: activate,
|
||||||
contextmenu: activate,
|
contextmenu: activate,
|
||||||
click: activate,
|
// click: activate,
|
||||||
})
|
})
|
||||||
|
leafletLayer.addEventListener("click", activate)
|
||||||
// Add the feature to the index to open the popup when needed
|
// Add the feature to the index to open the popup when needed
|
||||||
this.leafletLayersPerId.set(key, {
|
this.leafletLayersPerId.set(key, {
|
||||||
feature: feature,
|
feature: feature,
|
||||||
|
|
Loading…
Reference in a new issue