فهرست منبع

Issue #805: title param exposed

cycle20 1 سال پیش
والد
کامیت
9cec5bddc0
2فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 5 2
      src/examples/assembly-tm/FeatureViewConfig.ts
  2. 2 0
      src/examples/assembly-tm/index.ts

+ 5 - 2
src/examples/assembly-tm/FeatureViewConfig.ts

@@ -29,7 +29,10 @@ import { fetchHtpDescriptor, fetchPdbtmJsvLibDescriptor, htpDescriptorToTrackDat
 import { TmDetRcsbPreset } from "./preset2";
 import { TmDetDescriptorCache } from "./tmdet-extension/prop";
 
-export async function createFeatureViewerConfing(params: { pdbEntry: string, pdbtmEntry: string, htpEntry: string, labelAsymId: string, side1: string }) {
+export async function createFeatureViewerConfing(
+    params: { pdbEntry: string, pdbtmEntry: string, htpEntry: string, labelAsymId: string, side1: string, title: string }
+) {
+
     const modelId = `${params.pdbEntry}_model`;
 
     const rowConfig: Array<RcsbFvRowConfigInterface> = [
@@ -120,7 +123,7 @@ export async function createFeatureViewerConfing(params: { pdbEntry: string, pdb
     }
 
     const sequenceConfig = {
-        title: "UniTmp example",
+        title: params.title,
         subtitle: `HTP entry ${params.htpEntry}`,
         config: customConfig
     };

+ 2 - 0
src/examples/assembly-tm/index.ts

@@ -11,6 +11,7 @@ function createViewer(configParams: any) {
             DebugUtil.enableLog();
 
             const panel3dConfig = await createConfig({
+                title: configParams.title,
                 elementId: configParams.elementId,
                 pdbEntry: configParams.pdbEntry,
                 labelAsymId: configParams.labelAsymId,
@@ -30,6 +31,7 @@ async function createConfig(configParams: any): Promise<RcsbFv3DCustomInterface>
     const pdbEntry = configParams.pdbEntry;
     const labelAsymId = configParams.labelAsymId;
     const params = {
+        title: configParams.title,
         side1: configParams.side1,
         htpEntry: configParams.htpEntry,
         pdbEntry: configParams.pdbEntry,