Browse Source

mol-plugin: fix SelectionFromScript & volume streaming bugs

David Sehnal 5 years ago
parent
commit
529c6ac81c

+ 1 - 1
src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts

@@ -212,7 +212,7 @@ export namespace VolumeStreaming {
             });
 
             this.subscribeObservable(this.plugin.behaviors.interaction.click, ({ current, buttons, modifiers }) => {
-                if (!Binding.match(this.params.bindings.clickVolumeAroundOnly, buttons, modifiers)) return;
+                if (!Binding.match(this.params.bindings.clickVolumeAroundOnly || DefaultBindings.clickVolumeAroundOnly, buttons, modifiers)) return;
                 if (this.params.view.name !== 'selection-box') {
                     this.lastLoci = current;
                 } else {

+ 1 - 1
src/mol-plugin/state/transforms/model.ts

@@ -425,7 +425,7 @@ const StructureSelectionFromScript = PluginStateTransform.BuiltIn({
         return new SO.Molecule.Structure(s, props);
     },
     update: ({ a, b, oldParams, newParams, cache }) => {
-        if (Script.areEqual(oldParams.script, newParams.script)) {
+        if (!Script.areEqual(oldParams.script, newParams.script)) {
             return StateTransformer.UpdateResult.Recreate;
         }
 

+ 6 - 0
src/mol-plugin/util/structure-comlex-helper.ts

@@ -0,0 +1,6 @@
+/**
+ * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
+ *
+ * @author David Sehnal <david.sehnal@gmail.com>
+ */
+