Pārlūkot izejas kodu

reset camera on mol* selection null

bioinsilico 4 gadi atpakaļ
vecāks
revīzija
6cf91ac891
2 mainītis faili ar 7 papildinājumiem un 2 dzēšanām
  1. 1 1
      package.json
  2. 6 1
      src/RcsbFvSequence/SequenceViews/AssemblyView.tsx

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@rcsb/rcsb-saguaro-3d",
-  "version": "0.0.15",
+  "version": "0.0.16",
   "description": "RCSB Molstar/Saguaro Web App",
   "main": "build/dist/RcsbFv3DBuilder.js",
   "files": [

+ 6 - 1
src/RcsbFvSequence/SequenceViews/AssemblyView.tsx

@@ -123,15 +123,20 @@ export class AssemblyView extends AbstractView<AssemblyViewInterface & AbstractV
         if(getRcsbFv(this.pfvDivId) == null)
             return;
         this.innerSelectionFlag = true;
-        if(mode === 'select')
+        if(mode === 'select'){
             this.props.plugin.removeComponent();
+        }
         const allSel: Array<ChainSelectionInterface> | undefined = this.props.selection.getSelection(mode);
         if(allSel == null || allSel.length ===0) {
             getRcsbFv(this.pfvDivId).clearSelection(mode);
+            if(mode === 'select')
+                this.props.plugin.resetCamera();
         }else{
             const sel: ChainSelectionInterface | undefined = this.props.selection.getSelectionWithCondition(this.currentModelId, this.currentLabelAsymId, mode);
             if (sel == null) {
                 getRcsbFv(this.pfvDivId).clearSelection(mode);
+                if(mode === 'select')
+                    this.props.plugin.resetCamera();
             } else {
                 getRcsbFv(this.pfvDivId).setSelection({elements: sel.regions, mode: mode});
             }