Ver código fonte

added defaultParams to CustomProperty.Provider

Alexander Rose 5 anos atrás
pai
commit
969a19d515

+ 1 - 0
src/mol-model-props/common/custom-model-property.ts

@@ -49,6 +49,7 @@ namespace CustomModelProperty {
             label: builder.label,
             descriptor: builder.descriptor,
             getParams: builder.getParams,
+            defaultParams: builder.defaultParams,
             isApplicable: builder.isApplicable,
             attach: async (ctx: CustomProperty.Context, data: Model, props: Partial<PD.Values<Params>> = {}) => {
                 const property = get(data)

+ 1 - 0
src/mol-model-props/common/custom-property.ts

@@ -29,6 +29,7 @@ namespace CustomProperty {
         readonly label: string
         readonly descriptor: CustomPropertyDescriptor
         readonly getParams: (data: Data) => Params
+        readonly defaultParams: Params
         readonly isApplicable: (data: Data) => boolean
         readonly attach: (ctx: Context, data: Data, props?: Partial<PD.Values<Params>>) => Promise<void>
         readonly get: (data: Data) => ValueBox<Value | undefined>

+ 1 - 0
src/mol-model-props/common/custom-structure-property.ts

@@ -49,6 +49,7 @@ namespace CustomStructureProperty {
             label: builder.label,
             descriptor: builder.descriptor,
             getParams: builder.getParams,
+            defaultParams: builder.defaultParams,
             isApplicable: builder.isApplicable,
             attach: async (ctx: CustomProperty.Context, data: Structure, props: Partial<PD.Values<Params>> = {}) => {
                 if (builder.type === 'root') data = data.root