Procházet zdrojové kódy

interactivity: selectOnly, only deselect for the structure of the given loci

Alexander Rose před 5 roky
rodič
revize
0328e93518
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/mol-plugin-state/manager/interactivity.ts

+ 2 - 1
src/mol-plugin-state/manager/interactivity.ts

@@ -204,9 +204,10 @@ namespace InteractivityManager {
         }
 
         selectOnly(current: Representation.Loci, applyGranularity = true) {
-            this.deselectAll();
             const normalized = this.normalizedLoci(current, applyGranularity);
             if (StructureElement.Loci.is(normalized.loci)) {
+                // only deselect for the structure of the given loci
+                this.deselect({ loci: Structure.toStructureElementLoci(normalized.loci.structure), repr: normalized.repr }, false);
                 this.sel.modify('set', normalized.loci);
             }
             this.mark(normalized, MarkerAction.Select);