Sebastian Bittrich 1 سال پیش
والد
کامیت
8cabf4a05f
3فایلهای تغییر یافته به همراه8 افزوده شده و 13 حذف شده
  1. 4 1
      src/viewer/helpers/model.ts
  2. 4 5
      src/viewer/helpers/preset.ts
  3. 0 7
      src/viewer/helpers/selection.ts

+ 4 - 1
src/viewer/helpers/model.ts

@@ -23,7 +23,9 @@ export class ModelLoader {
             ? (await this.plugin.builders.data.readFile({ file: Asset.File(fileOrUrl), isBinary, label: props?.dataLabel })).data
             : await this.plugin.builders.data.download({ url: fileOrUrl, isBinary, label: props?.dataLabel });
 
-        return await this.handleTrajectory<P, S>(data, format, props, matrix, reprProvider, params) as any;
+        const hierarchy = await this.handleTrajectory<P, S>(data, format, props, matrix, reprProvider, params) as any;
+
+        return hierarchy;
     }
 
     async parse<P = any, S = {}>(parse: ParseParams, props?: PresetProps & { dataLabel?: string }, matrix?: Mat4, reprProvider?: TrajectoryHierarchyPresetProvider<P, S>, params?: P) {
@@ -71,6 +73,7 @@ export class ModelLoader {
 
             return selector;
         }
+
     }
 
     constructor(private plugin: PluginContext) {

+ 4 - 5
src/viewer/helpers/preset.ts

@@ -72,8 +72,8 @@ export type EmptyProps = {
 } & BaseProps
 
 type ValidationProps = {
-    kind: 'validation',
-    colorTheme?: string,
+    kind: 'validation'
+    colorTheme?: string
     showClashes?: boolean
 } & BaseProps
 
@@ -82,14 +82,13 @@ type StandardProps = {
 } & BaseProps
 
 type SymmetryProps = {
-    kind: 'symmetry',
+    kind: 'symmetry'
     symmetryIndex?: number
 } & BaseProps
 
 type FeatureProps = {
     kind: 'feature',
-    target: Target,
-    alpha: number
+    target: Target
 } & BaseProps
 
 type DensityProps = {

+ 0 - 7
src/viewer/helpers/selection.ts

@@ -203,13 +203,6 @@ export function rangeToTest(asymId: string, residues: number[], operatorName?: s
     }
 }
 
-export function targetsToLoci(targets: Target[], structure: Structure): StructureElement.Loci {
-    const expression = targetsToExpression(targets);
-    const query = compile<StructureSelection>(expression);
-    const selection = query(new QueryContext(structure));
-    return StructureSelection.toLociWithSourceUnits(selection);
-}
-
 export function targetToLoci(target: Target, structure: Structure): StructureElement.Loci {
     const expression = targetToExpression(target);
     const query = compile<StructureSelection>(expression);