Procházet zdrojové kódy

minor syntax refactor

bioinsilico před 2 roky
rodič
revize
ab786f0d00

+ 3 - 3
src/RcsbFvSequence/SequenceViews/RcsbView/CallbackManagerFactoryInterface.ts

@@ -25,21 +25,21 @@ export interface CallbackManagerFactoryInterface<R,U> {
 export interface CallbackConfigInterface<R> {
     rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     stateManager: RcsbFvStateManager;
-    plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface<R>;
+    structureViewer: ViewerCallbackManagerInterface & ViewerActionManagerInterface<R>;
     pfvFactory: PfvManagerInterface;
 }
 
 export abstract class AbstractCallbackManager<R,U> implements CallbackManagerInterface<U> {
     protected readonly rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     protected readonly stateManager: RcsbFvStateManager;
-    protected readonly plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface<R>;
+    protected readonly structureViewer: ViewerCallbackManagerInterface & ViewerActionManagerInterface<R>;
     protected pfvFactory: PfvManagerInterface;
     private readonly isInnerSelection: DataContainer<boolean> = new DataContainer<boolean>();
 
     constructor(config: CallbackConfigInterface<R>) {
         this.rcsbFvContainer = config.rcsbFvContainer;
         this.stateManager = config.stateManager;
-        this.plugin = config.plugin;
+        this.structureViewer = config.structureViewer;
         this.pfvFactory = config.pfvFactory;
     }
 

+ 3 - 3
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/AssemblyPfvManagerFactory.tsx

@@ -57,7 +57,7 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
     }
 
     public async create(config: BuildPfvInterface): Promise<RcsbFvModulePublicInterface | undefined> {
-        this.plugin.clearFocus();
+        this.structureViewer.clearFocus();
         const onChangeCallback: Map<string, (x: PolymerEntityInstanceInterface)=>void> = new Map<string, (x: PolymerEntityInstanceInterface) => {}>();
         const assemblyInstances: Map<string, Set<string>> = new Map<string, Set<string>>();
         this.stateManager.assemblyModelSate.forEach((v,k)=>{
@@ -100,7 +100,7 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
                     filterInstances: assemblyInstances.get(this.stateManager.assemblyModelSate.getString("entryId")),
                     selectButtonOptionProps: (props: SelectOptionProps) => (
                         <div style={{display: 'flex'}}>
-                            <ChainDisplayComponent structureViewer={this.plugin} label={props.data.label}/>
+                            <ChainDisplayComponent structureViewer={this.structureViewer} label={props.data.label}/>
                             {props.children}
                         </div>)
                 },
@@ -114,7 +114,7 @@ class AssemblyPfvManager<R> extends AbstractPfvManager<{instanceSequenceConfig:
             );
         }
         if(!config.defaultAuthId)
-            await createComponents<R>(this.plugin, this.stateManager.assemblyModelSate.getMap());
+            await createComponents<R>(this.structureViewer, this.stateManager.assemblyModelSate.getMap());
         return this.module;
     }
 

+ 1 - 1
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryImplementation/UniprotPfvManagerFactory.ts

@@ -101,7 +101,7 @@ class UniprotPfvManager<R> extends AbstractPfvManager<{upAcc:string},R,{context:
 
     private async loadAlignment(alignmentContext: AlignmentRequestContextType, targetAlignment: TargetAlignment): Promise<void> {
         if(typeof targetAlignment.target_id === "string") {
-            await this.structureLoader.load(this.plugin,this.structureRef,TagDelimiter.parseEntity(targetAlignment.target_id));
+            await this.structureLoader.load(this.structureViewer,this.structureRef,TagDelimiter.parseEntity(targetAlignment.target_id));
         }
     }
 

+ 3 - 3
src/RcsbFvSequence/SequenceViews/RcsbView/PfvManagerFactoryInterface.ts

@@ -16,7 +16,7 @@ export interface PfvManagerFactoryConfigInterface<R,U> {
     rcsbFvDivId: string;
     rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     stateManager: RcsbFvStateManager;
-    plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>;
+    structureViewer: ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>;
     boardConfigContainer: DataContainer<Partial<RcsbFvBoardConfigInterface>>;
     pfvChangeCallback(context: U): Promise<void>;
     additionalConfig: RcsbFvAdditionalConfig & {operatorChangeCallback?:(operatorInfo: OperatorInfo)=>void} | undefined;
@@ -40,7 +40,7 @@ export abstract class AbstractPfvManager<T,R,U> implements PfvManagerInterface {
     protected readonly rcsbFvDivId: string;
     protected readonly rcsbFvContainer: DataContainer<RcsbFvModulePublicInterface>;
     protected readonly stateManager: RcsbFvStateManager;
-    protected readonly plugin: ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>;
+    protected readonly structureViewer: ViewerCallbackManagerInterface & ViewerActionManagerInterface <R>;
     protected readonly boardConfigContainer: DataContainer<Partial<RcsbFvBoardConfigInterface>>;
     protected readonly pfvChangeCallback: (context: U)=>Promise<void>;
     protected readonly additionalConfig: RcsbFvAdditionalConfig & {operatorChangeCallback?:(operatorInfo: OperatorInfo)=>void} | undefined;
@@ -49,7 +49,7 @@ export abstract class AbstractPfvManager<T,R,U> implements PfvManagerInterface {
         this.rcsbFvDivId = config.rcsbFvDivId;
         this.rcsbFvContainer = config.rcsbFvContainer;
         this.stateManager = config.stateManager;
-        this.plugin = config.plugin;
+        this.structureViewer = config.structureViewer;
         this.additionalConfig = config.additionalConfig;
         this.boardConfigContainer = config.boardConfigContainer;
         this.pfvChangeCallback = config.pfvChangeCallback;

+ 2 - 2
src/RcsbFvSequence/SequenceViews/RcsbView/RcsbView.tsx

@@ -39,7 +39,7 @@ export class RcsbView<T,R,U> extends AbstractView<RcsbViewInterface<T,R,U>, {},
             ...this.props.pfvParams,
             rcsbFvContainer: this.rcsbFvContainer,
             stateManager: this.props.stateManager,
-            plugin: this.props.structureViewer,
+            structureViewer: this.props.structureViewer,
             boardConfigContainer: this.boardConfigContainer,
             rcsbFvDivId: this.rcsbFvDivId,
             pfvChangeCallback: this.pfvChangeCallback.bind(this),
@@ -49,7 +49,7 @@ export class RcsbView<T,R,U> extends AbstractView<RcsbViewInterface<T,R,U>, {},
         this.callbackManager = this.props.callbackManagerFactory.getCallbackManager({
             rcsbFvContainer: this.rcsbFvContainer,
             stateManager: this.props.stateManager,
-            plugin: this.props.structureViewer,
+            structureViewer: this.props.structureViewer,
             pfvFactory: this.pfvFactory
         });
     }