-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
CARTO: Add Layer exports to ease subclassing #9235
Conversation
data, | ||
// TODO: Tileset2D should be generic over TileIndex type | ||
TilesetClass: QuadbinTileset2D as any, | ||
renderSubLayers, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking, that if we allow overriding TileLayer
class, why not allowing overriding of RasterLayer
too?
(that was something i wanted to do when experimenting with this class)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did consider that, but we have no precedent doing that elsewhere in TileLayer
or subclasses. The design of TileLayer
is to provide the renderSubLayers
prop to allow the application to set (or override) the correct class. In this layer we hardcode it, preventing it from being set from the outside. Perhaps it would be better to move the definition of renderSubLayers
to defaultProps like TileLayer
does it?
Background
A number of the internal types & layers were not exported, making it hard to customize/subclass
Change List
getSubLayerClass
inCompositeLayer
to allow_subLayerProps: {'layer': type}
injections