Open rehan-sattar opened 4 years ago
When I'm opening the info window on cluster on mouse over event, the component is re rendering again and again.
Here is my function where I'm opening the window.
openWindow(position: IInfoWindowPosition, options: IInfoWindowOptions): void { this.infoWindowOptions.content = options.content this.infoWindowPosition = position this.openInfoWindow = true this.infoWindowOptions.pixelOffset = options.pixelOffset }
Here is the flow where I'm triggering the events and catching them:
<gmap-cluster @mouseover="showCountryAndCityNamesInWindow" @mouseout="closeInfoWindow" :zoomOnClick="true" :styles="clusterStyles" > <gmap-info-window :options="infoWindowOptions" :position="infoWindowPosition" :opened="openInfoWindow" /> </gmap-cluster> showCountryAndCityNamesInWindow(event) { // extra code here .... this.openWindow(position, options) }
NOTE: There is no mouseenter event in your component. Therefore I had to use mousehover for this feature.
mouseenter
mousehover
When I'm opening the info window on cluster on mouse over event, the component is re rendering again and again.
Here is my function where I'm opening the window.
Here is the flow where I'm triggering the events and catching them: