Skip to content
Snippets Groups Projects
Commit 529c6ac8 authored by David Sehnal's avatar David Sehnal
Browse files

mol-plugin: fix SelectionFromScript & volume streaming bugs

parent 19559d01
No related branches found
No related tags found
No related merge requests found
...@@ -212,7 +212,7 @@ export namespace VolumeStreaming { ...@@ -212,7 +212,7 @@ export namespace VolumeStreaming {
}); });
this.subscribeObservable(this.plugin.behaviors.interaction.click, ({ current, buttons, modifiers }) => { 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') { if (this.params.view.name !== 'selection-box') {
this.lastLoci = current; this.lastLoci = current;
} else { } else {
......
...@@ -425,7 +425,7 @@ const StructureSelectionFromScript = PluginStateTransform.BuiltIn({ ...@@ -425,7 +425,7 @@ const StructureSelectionFromScript = PluginStateTransform.BuiltIn({
return new SO.Molecule.Structure(s, props); return new SO.Molecule.Structure(s, props);
}, },
update: ({ a, b, oldParams, newParams, cache }) => { update: ({ a, b, oldParams, newParams, cache }) => {
if (Script.areEqual(oldParams.script, newParams.script)) { if (!Script.areEqual(oldParams.script, newParams.script)) {
return StateTransformer.UpdateResult.Recreate; return StateTransformer.UpdateResult.Recreate;
} }
......
/**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment