Explorar el Código

mol-model-state: fix custom props transform bug

David Sehnal hace 5 años
padre
commit
74acb0d078
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/mol-plugin-state/transforms/model.ts

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

@@ -699,6 +699,7 @@ const CustomModelProperties = PluginStateTransform.BuiltIn({
     },
     update({ a, b, oldParams, newParams }, ctx: PluginContext) {
         return Task.create('Custom Props', async taskCtx => {
+            b.data = a.data;
             b.label = a.label;
             b.description = a.description;
             for (const name of oldParams.autoAttach) {
@@ -747,6 +748,7 @@ const CustomStructureProperties = PluginStateTransform.BuiltIn({
     },
     update({ a, b, oldParams, newParams }, ctx: PluginContext) {
         return Task.create('Custom Props', async taskCtx => {
+            b.data = a.data;
             b.label = a.label;
             b.description = a.description;
             for (const name of oldParams.autoAttach) {