Skip to content

Commit

Permalink
Merge pull request #52 from oliverkirsch/main
Browse files Browse the repository at this point in the history
Attempt to fix closeclick issue in InfoWindow
  • Loading branch information
NathanAP authored Feb 24, 2023
2 parents 1f44e8f + 0ea377c commit f1fcf4b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/infoWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ export default buildComponent({
this.$infoWindowObject.close()
if (this.opened) {
this.$infoWindowObject.open(this.$map, this.$markerObject)
} else {
this.$emit('closeclick')
}
},
},
afterCreate() {
this._openInfoWindow()
this.$infoWindowObject.addListener('closeclick', () => {
this.$emit('closeclick')
this.$infoWindowObject.open(this.$map, this.$markerObject)
})
this.$watch('opened', () => {
this._openInfoWindow()
})
Expand Down

0 comments on commit f1fcf4b

Please sign in to comment.