Skip to content
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

One map responsive #68

Merged
merged 7 commits into from
May 19, 2022
Merged

One map responsive #68

merged 7 commits into from
May 19, 2022

Conversation

aparlato
Copy link
Collaborator

@aparlato aparlato commented May 18, 2022

Closes #65
Closes #66

This allows a single map pane as well as creates a responsive mode. For now, responsive mode only works when looking at just one map to be able to get something out more quickly. There may be some complications in allowing this for 2 maps considering the size is so variable, so I'm inclined to handle that as a followup. Let me know if you disagree here though! Width and height are persisted in the URL.

@ebrelsford I've run into a bug where very occasionally the maps array in the URL will reset to blank and I'll see zero maps. This isn't something I can consistently replicate and it's possible it's a preexisting bug to this PR. I'm not sure what is causing this and I can't think of any code here that would have that effect. Please let me know if you run into this and have any hunches.

Copy link
Contributor

@ebrelsford ebrelsford left a comment

Choose a reason for hiding this comment

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

This looks good to me.

What do you think (as a follow-up) of handling the pixel ratio of the simulated device? I know how to do that globally (with window.devicePixelRatio) but maybe there is a more elegant way we could look into.

@aparlato
Copy link
Collaborator Author

@ebrelsford yea I think that's a great idea. I'll open an issue for that on merging this.

@aparlato aparlato merged commit 8dc7d26 into main May 19, 2022
@aparlato aparlato deleted the one-map-responsive branch May 19, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make a custom/responsive view mode Allow showing one map pane
2 participants