Open a-gagnon opened 11 months ago
Yeah, that's weird. It is overridden (statically) in classes like SpatialViewState.
I suspect the author wanted to mark it abstract
, but TypeScript doesn't support abstract static methods.
The base implementation should probably check the BIS class of the supplied ViewStateProps and invoke the corresponding subclass (e.g., SpatialViewState.createFromProps).
I tried using
ViewState.createFromProps
by passing ViewStateProps that I previously obtained by callingViewState.toProps()
. I kept wondering why it always returned undefined until I looked at the implementation which always returns undefined... It might be a good idea to put a note to use convertViewStatePropsToViewState instead and eventually remove this entirely?⚠ Do not edit this section. It is required for imodeljs.github.io ➟ GitHub issue linking