@@ -72,6 +72,7 @@ import { PDBeViewportControls } from './ui/pdbe-viewport-controls';
7272import { UIComponents } from './ui/split-ui/components' ;
7373import { LayoutSpec , createPluginSplitUI , resolveHTMLElement } from './ui/split-ui/split-ui' ;
7474import { TrackballControlsProps } from 'molstar/lib/mol-canvas3d/controls/trackball' ;
75+ import { LeftPanelTabName } from 'molstar/lib/mol-plugin/layout' ;
7576
7677
7778export class PDBeMolstarPlugin {
@@ -276,7 +277,7 @@ export class PDBeMolstarPlugin {
276277
277278 if ( this . initParams . superposition ) {
278279 // Set left panel tab
279- this . plugin . behaviors . layout . leftPanelTabName . next ( 'segments' as any ) ;
280+ this . plugin . behaviors . layout . leftPanelTabName . next ( 'segments' as LeftPanelTabName ) ;
280281
281282 // Initialise superposition
282283 initSuperposition ( this . plugin , this . events . loadComplete ) ;
@@ -394,11 +395,11 @@ export class PDBeMolstarPlugin {
394395 PluginCustomState ( this . plugin ) . events ?. isBusy . next ( true ) ;
395396 if ( fullLoad ) await this . clear ( ) ;
396397 const isHetView = this . initParams . ligandView ? true : false ;
397- let downloadOptions : any = undefined ;
398+ let downloadOptions : Parameters < typeof Asset . Url > [ 1 ] = undefined ;
398399 let isBranchedView = false ;
399400 if ( this . initParams . ligandView && this . initParams . ligandView . label_comp_id_list ) {
400- isBranchedView = true ;
401401 downloadOptions = { body : JSON . stringify ( this . initParams . ligandView . label_comp_id_list ) , headers : [ [ 'Content-type' , 'application/json' ] ] } ;
402+ isBranchedView = true ;
402403 }
403404
404405 const data = await this . plugin . builders . data . download ( { url : Asset . Url ( url , downloadOptions ) , isBinary } , { state : { isGhost : true } } ) ;
@@ -693,7 +694,7 @@ export class PDBeMolstarPlugin {
693694 }
694695 } ,
695696
696- /** With `isSpinning ` parameter, switch visual rotation on or off. Without `isSpinning ` parameter, toggle rotation. If `resetCamera`, also reset the camera zoom. */
697+ /** With `spin ` parameter, switch visual rotation on or off. Without `spin ` parameter, toggle rotation. If `resetCamera`, also reset the camera zoom. */
697698 toggleSpin : async ( spin ?: boolean , resetCamera ?: boolean ) => {
698699 if ( ! this . plugin . canvas3d ) return ;
699700 const trackball = this . plugin . canvas3d . props . trackball ;
@@ -1024,7 +1025,7 @@ export class PDBeMolstarPlugin {
10241025
10251026 /** Remove any custom tooltips added by the `tooltips` method. */
10261027 clearTooltips : async ( structureNumberOrId ?: number | string ) => {
1027- await this . visual . tooltips ( { data : [ ] , structureId : structureNumberOrId as any } ) ;
1028+ await this . visual . tooltips ( { data : [ ] , structureId : structureNumberOrId as string | undefined } ) ;
10281029 } ,
10291030
10301031 /** Set highlight and/or selection color.
0 commit comments