Closed prushforth closed 4 months ago
This will require adding a mutation observer to \childList
mutations, does not include subtree
type mutations, and it probably shouldn't keep track of subtree
modifications, maybe it would not perform well.
This will require adding a mutation observer to
.
Yes that seems like the best option, only other option that comes to mind (if we don't want many mutation observers slowing down our codebase) is to implement this inside of the map-meta connectedcallback which checks what it was appended to (and wait on whenReady) and invokes the parent's method to take it into account. Though I think we already tried this approach and it did not work well for us for some reason.
I do believe that the
bounds strategy should be updated, to be calculated according to a similar strategy to that used by as described in the first paragraph above, that is, the in-scope extent-contributing elements should form a baseline extent for the .
We discussed this and we defined "in-scope extent-contributing \
Available in 0.13.0
The \ element uses child \ elements for extent and zoom to define an extent that is added to by layer content. That is, if a \ has no content, its extent bounds and zoom bounds default to that of the projection; if it has content, the content defines the bounds and zoom bounds, and the projection bounds/zoom bounds aren't taken into account. (The first, in document order) \ child \ elements for bounds and zoom bounds, if present, define bounds similar to \ and \: each is one of many contributing elements to bounds and zoom bounds.
In the \ case, the bounds and zoom bounds are calculated ONLY through the addition of all the child \ bounds. Child \ elements are not considered from the \ POV. Each (templated) child \ element calculates its own bounds and zoom bounds, based on a strategy or algorithm which currently only considers sibling and ancestor \ bounds-related elements (name=zoom or name=extent) IFF a bounds and zoom bounds can't be calculated from associated \s. I think this strategy is ok for \ extent calculation: it gives the author an 'out' from specifying axis min/max on \ elements, which can be slightly confusing. Entering the extent as bounds to keep the templated \ as simple as possible.
<map-meta name="extent" content="..."></map-meta>
might be slightly easier YMMV. It can be considered an alternative markup strategy for \Should \ directly consider the sibling and/or ancestor \?
I don't think so, but I do believe that the \ bounds strategy should be updated, to be calculated according to a similar strategy to that used by \ as described in the first paragraph above, that is, the in-scope extent-contributing \ elements should form a baseline extent for the \.
cc @AliyanH