Open rubenthoms opened 1 month ago
It is for convenience. If you display a single view (the usual case), you probably don't want to specify all the displayed layers on one side plus all the corresponding layer ids for the viewport...
@w1nklr I understand the use case. However, in my opinion, sending in an empty list should result in showing no layers, as specified. Why can't layerIds
be left undefined
if one wants all layers to be displayed?
I don't know. I was not there at the initial design... I don't really see the use case needed to display nothing.
But if you have such an use case and if you can provide an easy way to display all the layers (and set that as DEFAULT_VIEWS), I don't object to a change.
BTW, this would be closer to Deck.gl approach: https://github.com/visgl/deck.gl/blob/4dd814805121ab70c16ea3b458593ecc92f92f1a/docs/api-reference/core/layer-manager.md?plain=1#L46
We have a component where individual viewports can be added. To each of the latter custom layers can be added later on (in some sort of tree arrangement). When adding a layer to the first viewport, it becomes visible in all (empty) viewports although they should not have any children. We would be glad to have the possibility to temporarily have views without any layers.
Agree, it makes sense to be able to show empty views, especially in the multi-viewport case.
It should be a minor change. Who will fix this (preferably with a story to demonstrate)?
I would expect a viewport with an empty layer ids list to not show anything.