Skip to content

Commit 507d5f3

Browse files
Administratoristarkov
authored andcommitted
Bugfix: _onGoogleApiLoaded() callback was being called on onZoom because it was in the draw() method.
1 parent 0a369cc commit 507d5f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/google_map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ export default class GoogleMap extends Component {
404404
this.map_ = map;
405405
this.maps_ = maps;
406406

407+
this._onGoogleApiLoaded({map, maps});
408+
407409
// render in overlay
408410
const this_ = this;
409411
const overlay = this.overlay_ = assign(new maps.OverlayView(), {
@@ -460,8 +462,6 @@ export default class GoogleMap extends Component {
460462
this_.updateCounter_++;
461463
this_._onBoundsChanged(map, maps, !this_.props.debounced);
462464

463-
this_._onGoogleApiLoaded({map, maps});
464-
465465
div.style.left = `${ptxRounded.x}px`;
466466
div.style.top = `${ptxRounded.y}px`;
467467
if (this_.markersDispatcher_) {

0 commit comments

Comments
 (0)