|
@@ -2,11 +2,6 @@ import {
|
|
|
CustomViewInterface,
|
|
|
FeatureViewInterface
|
|
|
} from "../RcsbFvSequence/SequenceViews/CustomView/CustomView";
|
|
|
-import {
|
|
|
- RcsbFv,
|
|
|
- RcsbFvRowConfigInterface,
|
|
|
- RcsbFvTrackDataElementInterface
|
|
|
-} from "@rcsb/rcsb-saguaro";
|
|
|
import { RegionSelectionInterface } from "../RcsbFvState/RcsbFvSelectorManager";
|
|
|
import {
|
|
|
StructureViewerPublicInterface, SaguaroRegionList
|
|
@@ -23,6 +18,9 @@ import {ViewerProps} from "@rcsb/rcsb-molstar/build/src/viewer";
|
|
|
import { getStyleColorString, updateSiteColors } from "./tmdet-extension/tmdet-color-theme";
|
|
|
import { TmDetRcsbPreset } from "./TmTrajectoryHierarchyPreset";
|
|
|
import { TmRowTitleComponent } from "./tmdet-viewer/TmRowTitleComponent";
|
|
|
+import { RcsbFvRowConfigInterface } from "@rcsb/rcsb-saguaro/lib/RcsbFv/RcsbFvConfig/RcsbFvConfigInterface";
|
|
|
+import { RcsbFvTrackDataElementInterface } from "@rcsb/rcsb-saguaro/lib/RcsbDataManager/RcsbDataManager";
|
|
|
+import { RcsbFv } from "@rcsb/rcsb-saguaro/lib/RcsbFv/RcsbFv";
|
|
|
|
|
|
export type TmFvConfigParams = {
|
|
|
pdbEntry: string,
|
|
@@ -105,7 +103,7 @@ function setFvConfigCallbacks(fvConfig: FeatureViewInterface<LoadMolstarInterfac
|
|
|
plugin.resetCamera();
|
|
|
}
|
|
|
};
|
|
|
- fvConfig.sequenceElementClickCallback = (plugin: StructureViewerPublicInterface<LoadMolstarInterface<unknown,unknown>,LoadMolstarReturnType>, stateManager: RcsbFvStateManager, d: RcsbFvTrackDataElementInterface) => {
|
|
|
+ fvConfig.sequenceElementClickCallback = (plugin: StructureViewerPublicInterface<LoadMolstarInterface<unknown,unknown>,LoadMolstarReturnType>, stateManager: RcsbFvStateManager, d?: RcsbFvTrackDataElementInterface) => {
|
|
|
if(d!=null)
|
|
|
plugin.cameraFocus(modelId, labelAsymId, d.begin, d.end ?? d.begin);
|
|
|
};
|
|
@@ -113,7 +111,6 @@ function setFvConfigCallbacks(fvConfig: FeatureViewInterface<LoadMolstarInterfac
|
|
|
if(elements == null || elements.length == 0)
|
|
|
plugin.clearSelection("hover");
|
|
|
else {
|
|
|
- const e = elements[0];
|
|
|
plugin.select(elements.map(e=>({
|
|
|
modelId: modelId,
|
|
|
labelAsymId: labelAsymId,
|
|
@@ -144,7 +141,7 @@ function setFvConfigCallbacks(fvConfig: FeatureViewInterface<LoadMolstarInterfac
|
|
|
function emptyFvConfigCallbacks(fvConfig: FeatureViewInterface<LoadMolstarInterface<unknown,unknown>,LoadMolstarReturnType>) {
|
|
|
fvConfig.sequenceSelectionChangeCallback = (plugin: StructureViewerPublicInterface<LoadMolstarInterface<unknown,unknown>,LoadMolstarReturnType>, stateManager: RcsbFvStateManager, sequenceRegion: Array<RcsbFvTrackDataElementInterface>) => {
|
|
|
};
|
|
|
- fvConfig.sequenceElementClickCallback = (plugin: StructureViewerPublicInterface<LoadMolstarInterface<unknown,unknown>,LoadMolstarReturnType>, stateManager: RcsbFvStateManager, d: RcsbFvTrackDataElementInterface) => {
|
|
|
+ fvConfig.sequenceElementClickCallback = (plugin: StructureViewerPublicInterface<LoadMolstarInterface<unknown,unknown>,LoadMolstarReturnType>, stateManager: RcsbFvStateManager, d?: RcsbFvTrackDataElementInterface) => {
|
|
|
};
|
|
|
fvConfig.sequenceHoverCallback = (plugin: StructureViewerPublicInterface<LoadMolstarInterface<unknown,unknown>,LoadMolstarReturnType>, stateManager: RcsbFvStateManager, elements: Array<RcsbFvTrackDataElementInterface>) => {
|
|
|
};
|
|
@@ -167,9 +164,9 @@ export function setExternalRowTitleComponent(rows: RcsbFvRowConfigInterface[], t
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-function structureRowClickHandler(e: React.MouseEvent) {
|
|
|
- console.warn('TODO: implement structureRowClickHandler()');
|
|
|
-}
|
|
|
+// function structureRowClickHandler(e: React.MouseEvent) {
|
|
|
+// console.warn('TODO: implement structureRowClickHandler()');
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* Set region colors based on values read from CSS rules (ult_* classes) and
|
|
@@ -178,7 +175,7 @@ function structureRowClickHandler(e: React.MouseEvent) {
|
|
|
*/
|
|
|
export function setRegionColors(rows: RcsbFvRowConfigInterface[]) {
|
|
|
rows.forEach((track: RcsbFvRowConfigInterface) => {
|
|
|
- track.displayConfig?.forEach(region => {
|
|
|
+ track.displayConfig?.forEach((region: any) => {
|
|
|
const css = (region as any).css;
|
|
|
if (css) {
|
|
|
region.displayColor = getStyleColorString(css);
|