Skip to content

Keep original center on _mapDomResizeCallback - #282

Merged
istarkov merged 1 commit into
GoogleMapReact:masterfrom
Andries-Smit:patch-1
Nov 24, 2016
Merged

istarkov merged 1 commit into
GoogleMapReact: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
Member

Any picture? Or jsbin example please with the problem

@Andries-Smit

Copy link
Copy Markdown
Contributor Author

@istarkov

Copy link
Copy Markdown
Member

I see, thank you!!!

@istarkov
istarkov merged commit affee2a into GoogleMapReact:master Nov 24, 2016
@istarkov

Copy link
Copy Markdown
Member

[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

lock Bot commented Dec 1, 2019

Copy link
Copy Markdown

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