瀏覽代碼

fix volume streaming channel visibility

dsehnal 3 年之前
父節點
當前提交
4853ff7a1a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/mol-plugin/behavior/dynamic/volume-streaming/transformers.ts

+ 2 - 0
src/mol-plugin/behavior/dynamic/volume-streaming/transformers.ts

@@ -276,10 +276,12 @@ const VolumeStreamingVisual = PluginStateTransform.BuiltIn({
         // TODO: is this correct behavior?
         if (!channel) return StateTransformer.UpdateResult.Unchanged;
 
+        const visible = b.data.repr.state.visible;
         const params = createVolumeProps(a.data, newParams.channel);
         const props = { ...b.data.repr.props, ...params.type.params };
         b.data.repr.setTheme(Theme.create(plugin.representation.volume.themes, { volume: channel.data }, params));
         await b.data.repr.createOrUpdate(props, channel.data).runInContext(ctx);
+        b.data.repr.setState({ visible });
         b.data.sourceData = channel.data;
 
         // TODO: set the transform here as well in case the structure moves?