浏览代码

mol-model-state: fix custom props transform bug

David Sehnal 5 年之前
父节点
当前提交
74acb0d078
共有 1 个文件被更改,包括 2 次插入0 次删除
  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) {