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

First pass / rough draft of HTMLMapmlViewerElement.matchMedia API, #1008

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

prushforth
Copy link
Member

depends on media-query-parser and media-query-solver.

depends on media-query-parser and media-query-solver.
prefers-color-scheme,map-projection,map-zoom working up to the initial
matches.  Tbd if this will need modification to support dynamic
evaluation of map properties to support attaching event handlers.

Not yet determined: how to implement map-extent support, because media
features are all either discrete or range types, and while it may
be possible to implemnent a bbox using four corner values as the 
pre-determined corners of the bbox, it is less clear how to represent
a bbox as a media feature value, which does not typically contain 
commas.
(relies on M.options.contentPreference being an array).
allowing dynamic use of the object in event handlers.

Add window.matchMedia query + event listener for color-scheme changes,
allows map to adapt without having to shake it.
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.

1 participant