diff --git a/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts b/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts index 846b9d29977b5600fb4a0218190b7ca6fdf727d8..d39eda8b00c9dcd43d9772e5e09ada93258c1cf6 100644 --- a/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts +++ b/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts @@ -158,19 +158,19 @@ export namespace VolumeStreaming { const eR = this.params.view.params.radius; const box = StructureElement.Loci.getBoundary(loci).box; - const update = this.plugin.state.dataState.build().to(ref) - .update(CreateVolumeStreamingBehavior, old => ({ - ...old, - view: { - name: 'selection-box' as 'selection-box', - params: { - radius: eR, - bottomLeft: box.min, - topRight: box.max - } + const update = this.plugin.state.dataState.build().to(ref).update(CreateVolumeStreamingBehavior, old => ({ + ...old, + view: { + name: 'selection-box' as 'selection-box', + params: { + radius: eR, + bottomLeft: box.min, + topRight: box.max } - })); + } + })); + // TODO: create/use command queue here and cancel any ongoing updates. this.plugin.runTask(this.plugin.state.dataState.updateTree(update)); }); }