-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add media attribute to map-layer, map-link, map-style
Remove prefers-map-content hardcoded demo hack Add implementation of _changeHandler that invokes _onAdd, _onRemove. Add media query matches to map-layer._validateDisabled Re-organize _onRemove so that stuff isn't deleted until it's no longer needed, Make call to registerMediaQuery(mq) conditional on there being a mq, make it the path through which a layer gets initialized only when that is true, so as to not perform _onAdd twice. Move detection of media query matches check out of core if (map) block in map-layer._validateDisabled() Remove vestige of old prefers-map-content demo implementation from both map-link.js and layer.js Make execution of map-extent's map-projectionchange handler conditional on the there being a parentLayer._layer property value. This specifically covers the case when this handler is invoked by the projection change event happening, in which the parent layer may be disabled due to a media condition and therefore there is no LayerGroup to add the extentLayer to. add map-layer media attribute as an observed attribute Make map-link._registerMediaQuery async, wait on mapml-viewer to be ready before trying to register a media query (which may depend on mapml-viewer.extent). Remove map-link media attribute from those attributes that are copied onto the 'rendered' <link> element, because the link element actually supports the media attribute, but not the media features we are designing (hence it always forces the element to be disabled). Update map-layer._registerMediaQuery so that when the observed media attribute is removed or set to the empty string, the map-layer goes through the initialization life cycle, as though it was newly connected to the DOM (it may go from disabled to enabled due to the removal). Clean up map-layer _registerMediaQuery Add tests for <map-layer media="..."> attribute Add tests for <map-link rel="stylesheet" media="..."> attributes Add test for <map-link rel="features" media="..."> attribute cycling Update linux image for map-link-media test Co-authored-by: Yushan Mu <[email protected]> Initial implementation of map-style media attribute Refactor enable/disableLink methods to _enable/_disableLink Update / fix test title for map-link (should not be 'map-layer') Update implementation of map-style media attribute Add test for map-style media attribute.
- Loading branch information
1 parent
345de98
commit 0fc60ce
Showing
25 changed files
with
577 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.