Browse Source

fix structure/model props attachment

Alexander Rose 5 years ago
parent
commit
755699d479
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/mol-plugin/state/transforms/model.ts

+ 2 - 2
src/mol-plugin/state/transforms/model.ts

@@ -690,7 +690,7 @@ async function attachModelProps(model: Model, ctx: PluginContext, taskCtx: Runti
     const { autoAttach, properties } = params
     for (const name of Object.keys(properties)) {
         const property = ctx.customModelProperties.get(name)
-        const props = params[name as keyof typeof params]
+        const props = properties[name]
         if (autoAttach.includes(name)) {
             try {
                 await property.attach(propertyCtx, model, props)
@@ -725,7 +725,7 @@ async function attachStructureProps(structure: Structure, ctx: PluginContext, ta
     const { autoAttach, properties } = params
     for (const name of Object.keys(properties)) {
         const property = ctx.customStructureProperties.get(name)
-        const props = params[name as keyof typeof params]
+        const props = properties[name]
         if (autoAttach.includes(name)) {
             try {
                 await property.attach(propertyCtx, structure, props)