|
@@ -5,12 +5,16 @@ import { fetchDescriptor, registerRegionDescriptorData } from "./UniTmpHelper";
|
|
|
import { TmFv3DCustom } from "./tmdet-viewer/TmFv3DCustom";
|
|
|
import { RcsbFv } from "@rcsb/rcsb-saguaro";
|
|
|
import { updateSiteColors } from "./tmdet-extension/tmdet-color-theme";
|
|
|
+import { TmFv1DElement } from "./tmdet-viewer/TmFv1DComponent";
|
|
|
+
|
|
|
+customElements.define("tm-saguaro-1d", TmFv1DElement);
|
|
|
+
|
|
|
|
|
|
function createRcsb3DViewer(configParams: any) {
|
|
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
|
(async function(event) {
|
|
|
|
|
|
- updateSiteColors(configParams.side1 as any);
|
|
|
+ updateSiteColors(configParams.side1);
|
|
|
DebugUtil.enableLog();
|
|
|
|
|
|
const panel3dConfig = await createConfig(configParams);
|
|
@@ -67,7 +71,7 @@ async function createConfig(configParams: any): Promise<RcsbFv3DCustomInterface>
|
|
|
* @param side1 side1 paramter to update site colors, if it is needed
|
|
|
*/
|
|
|
async function createRcsbFeatureViewer(params: {
|
|
|
- elementId: string, url: string, side1: string, trackWidth?: number, rowTitleWidth?: number }) {
|
|
|
+ elementId: string, url: string, side1: string, trackWidth?: number, rowTitleWidth?: number }): Promise<RcsbFv> {
|
|
|
|
|
|
updateSiteColors(params.side1 as any);
|
|
|
|
|
@@ -85,7 +89,13 @@ async function createRcsbFeatureViewer(params: {
|
|
|
rowConfigData: rowConfig,
|
|
|
elementId: params.elementId
|
|
|
});
|
|
|
- return pfv;
|
|
|
+ (window as any).pfv = pfv;
|
|
|
+ console.log(pfv);
|
|
|
+ return new Promise<RcsbFv>((resolve) => { resolve(pfv); });
|
|
|
}
|
|
|
|
|
|
-export { DebugUtil, createRcsb3DViewer, createRcsbFeatureViewer };
|
|
|
+export {
|
|
|
+ DebugUtil,
|
|
|
+ createRcsb3DViewer,
|
|
|
+ createRcsbFeatureViewer,
|
|
|
+};
|