Skip to content

Commit

Permalink
Checking if popup is open in onRender (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
olabalboa authored and PaulLeCam committed Mar 22, 2018
1 parent 66dc136 commit 9104809
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default class Popup extends DivOverlay<LeafletElement, Props> {
}

onRender = () => {
if (this.props.autoPan !== false) {
if (this.props.autoPan !== false && this.leafletElement.isOpen()) {
if (this.leafletElement._map && this.leafletElement._map._panAnim) {
this.leafletElement._map._panAnim = undefined
}
Expand Down

0 comments on commit 9104809

Please sign in to comment.