We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 394d636 + 98dadad commit 23c2db0Copy full SHA for 23c2db0
1 file changed
map.js
@@ -804,9 +804,10 @@ class Events {
804
</div>
805
`
806
// Reposition after expanding
807
- content.querySelector('details').addEventListener('toggle', () => {
+ content.querySelector('details').addEventListener('toggle', (toggleEvent) => {
808
+ if (!toggleEvent.target.open) return;
809
const { lat, lng } = this.cachedInfoWindow.getPosition();
- window.map.panTo({ lat: lat() + 0.03, lng: lng()});
810
+ window.map.panTo({ lat: lat() + 0.005, lng: lng()});
811
})
812
this.cachedInfoWindow.setContent(content);
813
}
0 commit comments