From d22fb61567a5c7b3f48f3831df4b9060fee68b22 Mon Sep 17 00:00:00 2001
From: David Sehnal <david.sehnal@gmail.com>
Date: Sat, 2 Mar 2019 12:19:27 +0100
Subject: [PATCH] mol-plugin: vol streaming todo

---
 .../dynamic/volume-streaming/behavior.ts      | 22 +++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts b/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts
index 846b9d299..d39eda8b0 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));
             });
         }
-- 
GitLab