Skip to content
Snippets Groups Projects
Commit fac183c2 authored by Alexander Rose's avatar Alexander Rose
Browse files

allow partial reprParams in StructureRepresentation3DHelpers.createParams

parent b113448e
No related branches found
No related tags found
No related merge requests found
...@@ -68,9 +68,10 @@ namespace StructureRepresentation3DHelpers { ...@@ -68,9 +68,10 @@ namespace StructureRepresentation3DHelpers {
const repr = params.repr const repr = params.repr
? params.repr instanceof Array ? params.repr[0] : params.repr ? params.repr instanceof Array ? params.repr[0] : params.repr
: ctx.structureRepresentation.registry.default.provider; : ctx.structureRepresentation.registry.default.provider;
const reprDefaultParams = PD.getDefaultValues(repr.getParams(themeCtx, structure));
const reprParams = params.repr instanceof Array const reprParams = params.repr instanceof Array
? params.repr[1](repr as R, themeCtx, structure) ? { ...reprDefaultParams, ...params.repr[1](repr as R, themeCtx, structure) }
: PD.getDefaultValues(repr.getParams(themeCtx, structure)); : reprDefaultParams;
const color = params.color const color = params.color
? params.color instanceof Array ? params.color[0] : params.color ? params.color instanceof Array ? params.color[0] : params.color
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment