Commit 6f061a0
committed
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.
Fix map-style media attribute life cycle1 parent 345de98 commit 6f061a0
File tree
25 files changed
+579
-125
lines changed- src
- test/e2e
- data/restaurants
- elements
- map-layer
- map-link
- map-link-media.test.js-snapshots
- map-link-stylesheet-media.test.js-snapshots
- map-style
- map-style-media.test.js-snapshots
25 files changed
+579
-125
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| |||
114 | 121 | | |
115 | 122 | | |
116 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
117 | 130 | | |
118 | 131 | | |
119 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
120 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
121 | 171 | | |
122 | 172 | | |
123 | 173 | | |
124 | 174 | | |
125 | 175 | | |
126 | 176 | | |
127 | | - | |
128 | 177 | | |
129 | 178 | | |
130 | 179 | | |
131 | 180 | | |
132 | 181 | | |
133 | 182 | | |
134 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
135 | 191 | | |
136 | 192 | | |
137 | 193 | | |
| |||
141 | 197 | | |
142 | 198 | | |
143 | 199 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | 200 | | |
152 | 201 | | |
153 | 202 | | |
| |||
158 | 207 | | |
159 | 208 | | |
160 | 209 | | |
| 210 | + | |
161 | 211 | | |
162 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
163 | 220 | | |
164 | 221 | | |
165 | 222 | | |
| |||
170 | 227 | | |
171 | 228 | | |
172 | 229 | | |
| 230 | + | |
| 231 | + | |
173 | 232 | | |
174 | 233 | | |
175 | 234 | | |
176 | 235 | | |
177 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
178 | 241 | | |
179 | 242 | | |
180 | 243 | | |
| |||
189 | 252 | | |
190 | 253 | | |
191 | 254 | | |
192 | | - | |
193 | 255 | | |
194 | 256 | | |
195 | 257 | | |
196 | 258 | | |
197 | 259 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | 260 | | |
207 | 261 | | |
208 | 262 | | |
| |||
240 | 294 | | |
241 | 295 | | |
242 | 296 | | |
243 | | - | |
244 | 297 | | |
245 | 298 | | |
246 | 299 | | |
| |||
278 | 331 | | |
279 | 332 | | |
280 | 333 | | |
281 | | - | |
282 | 334 | | |
283 | 335 | | |
284 | 336 | | |
| |||
317 | 369 | | |
318 | 370 | | |
319 | 371 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | 372 | | |
328 | 373 | | |
329 | 374 | | |
| |||
372 | 417 | | |
373 | 418 | | |
374 | 419 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | 420 | | |
393 | 421 | | |
394 | 422 | | |
| |||
610 | 638 | | |
611 | 639 | | |
612 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
613 | 647 | | |
614 | | - | |
615 | 648 | | |
616 | 649 | | |
617 | 650 | | |
| |||
664 | 697 | | |
665 | 698 | | |
666 | 699 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | 700 | | |
697 | 701 | | |
698 | 702 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | | - | |
| 434 | + | |
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
| |||
0 commit comments