fix: do not try to reset tooltip of feature not on map
This can happen in a situation where: - a layer as zoom limits - we click on a feature, which opens a popup - then zoom over the layer's limit (with scroll or keyboard, not keyboard, in order to not close the popup) - then click in anywhere in the map, which will close the popup Since the highlight of features on click (cf #1359), we redraw them on popupclose, which explains the bug described above. fix #1575
This commit is contained in:
parent
8336dd2b78
commit
84bff2e416
1 changed files with 4 additions and 2 deletions
|
@ -794,8 +794,10 @@ L.U.PathMixin = {
|
|||
},
|
||||
|
||||
_redraw: function () {
|
||||
if (this.datalayer && this.datalayer.isVisible()) {
|
||||
this.setStyle()
|
||||
this.resetTooltip()
|
||||
}
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
|
|
Loading…
Reference in a new issue