Bugfix: _onGoogleApiLoaded() callback was being called on onZoom because it was in the draw() method.

This commit is contained in:
Administrator 2015-12-04 16:21:36 +01:00 committed by cybice
parent 0a369cc62c
commit 507d5f3cfd

View File

@ -404,6 +404,8 @@ export default class GoogleMap extends Component {
this.map_ = map;
this.maps_ = maps;
this._onGoogleApiLoaded({map, maps});
// render in overlay
const this_ = this;
const overlay = this.overlay_ = assign(new maps.OverlayView(), {
@ -460,8 +462,6 @@ export default class GoogleMap extends Component {
this_.updateCounter_++;
this_._onBoundsChanged(map, maps, !this_.props.debounced);
this_._onGoogleApiLoaded({map, maps});
div.style.left = `${ptxRounded.x}px`;
div.style.top = `${ptxRounded.y}px`;
if (this_.markersDispatcher_) {