Skip to content

Commit 7dfd95b

Browse files
committed
Remove some anys
1 parent 81f8d00 commit 7dfd95b

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file, following t
33

44
## [Unreleased]
55
- Updated TypeScript build config
6+
- Fix toggleSpin (broken since v3.11.0)
67

78
## [v3.12.0] - 2026-04-24
89
- Mol* core dependency updated to 5.8.0

src/app/viewer.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ import { PDBeViewportControls } from './ui/pdbe-viewport-controls';
7272
import { UIComponents } from './ui/split-ui/components';
7373
import { LayoutSpec, createPluginSplitUI, resolveHTMLElement } from './ui/split-ui/split-ui';
7474
import { TrackballControlsProps } from 'molstar/lib/mol-canvas3d/controls/trackball';
75+
import { LeftPanelTabName } from 'molstar/lib/mol-plugin/layout';
7576

7677

7778
export 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

Comments
 (0)