Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MakeresetBoundsOnResize preserve center when full-screened#482

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

josephfrazier
Copy link
Contributor

This supersedes andresolves#308,
as specified in#308 (comment)

Copy link
Member

@itsmichaeldiegoitsmichaeldiego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for your PR! It is looking good, I left a comment that is more like a question

@@ -398,7 +399,7 @@ export default class GoogleMap extends Component {
window.removeEventListener('keydown', this._onKeyDownCapture);
mapDom.removeEventListener('mousedown', this._onMapMouseDownNative, true);
window.removeEventListener('mouseup', this._onChildMouseUp, false);
if (this.props.resetBoundsOnResize) {
if (this.props.resetBoundsOnResize || this.props.lockCenter) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Wondering if|| this.props.lockCenter is really needed, asresetBoundsOnResize should be set to true if we want to lock the center, not sure if I am explaining myself, but I believe the map always should re-set the center when reseting the bounds on resize.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Hmm, I think I see what you're saying. I hadn't usedresetBoundsOnResize before, but I just tried it out on the master branch and on this PR's branch by runningyarn start and visitinghttp://localhost:4000/resizable. On both branches, resizing by dragging the lower- the map keeps the map centered, but only with this PR does clicking the fullscreen button also keep the map centered. I think it makes sense forresetBoundsOnResize to include thelockCenter behavior, so I removed thelockCenter stuff while keeping the behavioral changes. See692e15b

@josephfrazierjosephfrazier changed the titleAddlockCenter prop to preserve center on resizeMakeresetBoundsOnResize preserve center when full-screenedDec 21, 2017
@itsmichaeldiego
Copy link
Member

itsmichaeldiego commentedDec 21, 2017
edited
Loading

@josephfrazier Just to confirm, did you test latest changes? Could you upload something?

@josephfrazier
Copy link
ContributorAuthor

Yes, I verified the fix as outlinedabove, by runningyarn start, then visitinghttp://localhost:4000/resizable and clicking the full-screen button.

itsmichaeldiego and Marcel-G reacted with thumbs up emoji

@itsmichaeldiegoitsmichaeldiego merged commit0db8020 intogoogle-map-react:masterDec 22, 2017
@josephfrazierjosephfrazier deleted the lockCenter branchDecember 23, 2017 02:37
@lock
Copy link

lockbot commentedDec 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.

@locklockbot locked asresolvedand limited conversation to collaboratorsDec 1, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@itsmichaeldiegoitsmichaeldiegoitsmichaeldiego left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@josephfrazier@itsmichaeldiego@Marcel-G

[8]ページ先頭

©2009-2025 Movatter.jp