Closed rubenthoms closed 1 month ago
I think @@type
is only needed if you want to specify a layer using the JSON format, which I suppose you need if you use the Dash wrapper. In that case ColormapLayer should also extend ExtendedLayerProps
Moreover, I think the name
was added in order to be able to display a name label on respective views and for the layer toggles in the toolbar, which is now obsolete. We could consider deprecating the name
argument or at least making it optional.
Thanks for the quick reply, @hkfb. I am currently using the name
property to retrieve a layer's name when handling the picking information and creating respective readout information (readout info per layer). Of course, I could use the id and map it to the layers' names, but this comes quite handy. Or do you know of a better way to retrieve the name with the current implementation?
I could create a PR with the changes to the interface of ColormapLayer
, if you agree.
Thanks for the quick reply, @hkfb. I am currently using the
name
property to retrieve a layer's name when handling the picking information and creating respective readout information (readout info per layer). Of course, I could use the id and map it to the layers' names, but this comes quite handy. Or do you know of a better way to retrieve the name with the current implementation?
That makes sense, I didn't think of that use case.
I could create a PR with the changes to the interface of
ColormapLayer
, if you agree.
Yes, please go ahead.
:tada: This issue has been resolved in version subsurface-viewer@1.1.1 :tada:
The release is available on GitHub release
Should the interface of
ColormapLayer
extendExtendedLayerProps
in addition toBitmapLayerProps
to supportname
?name
is given indefaultProps
but not a valid property according to TypeScript. Same accounts for@@type
.