Skip to content

Keep original center on _mapDomResizeCallback #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2016

Conversation

Andries-Smit
Copy link
Contributor

When the resize event is triggered, the original center was lost.
This issue is significant when the map is renders outside visible dom with zero height and width.
When placed into the visible dom, the resize is triggered correctly. With this change the center will persist. (Without this fix the old center is the top left corner)

When the resize event is triggered, the original center was lost. 
This issue is significant when the map is renders outside visible dom with zero height and width.
When placed into the visible dom, the resize is triggered correctly. With this change the center will persist. (Without this fix the old center is the top left corner)
@istarkov
Copy link
Collaborator

Any picture? Or jsbin example please with the problem

@Andries-Smit
Copy link
Contributor Author

@istarkov
Copy link
Collaborator

I see, thank you!!!

@istarkov istarkov merged commit affee2a into google-map-react:master Nov 24, 2016
@istarkov
Copy link
Collaborator

google-map-react@0.21.4

@Andries-Smit
Copy link
Contributor Author

Thanks for the quick response, though I made a small mistake. I opened a new pull request. #283

@gablabelle
Copy link

@istarkov I tried to use the lockCenter prop without success.

How can I make sure that if I resize the map's container the center (and my marker) will stay in ... wait for it ... the center? ;-)

@lock
Copy link

lock bot commented Dec 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants