Skip to content

Keep original center on _mapDomResizeCallback#282

Merged
istarkov merged 1 commit intogoogle-map-react:masterfrom
Andries-Smit:patch-1
Nov 24, 2016
Merged

Keep original center on _mapDomResizeCallback#282
istarkov merged 1 commit intogoogle-map-react:masterfrom
Andries-Smit:patch-1

Conversation

@Andries-Smit
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

Any picture? Or jsbin example please with the problem

@Andries-Smit
Copy link
Copy Markdown
Contributor Author

@istarkov
Copy link
Copy Markdown
Collaborator

I see, thank you!!!

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

[email protected]

@Andries-Smit
Copy link
Copy Markdown
Contributor Author

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

@gablabelle
Copy link
Copy Markdown

@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
Copy Markdown

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