Skip to content

Commit

Permalink
styling changes, feature structure transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
NikoAnderson committed Sep 23, 2024
1 parent 4818868 commit d93c6b7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<div *ngIf = "featuresOnly">
<h4>Draw or import a structure using Ketcher. Then, if any features are detected a table will be automatically displayed under the editor.</h4>
<button mat-button color="primary" (click) = "loadForm()">Load Structure in Registration Form</button>
<button mat-button class = "registration-button" color="primary" (click) = "loadForm()">Load Structure in Registration Form</button>
</div>
<div>
<app-structure-editor (loadedMolfile)="molvecUpdate($event)" (editorOnLoad)="editorOnLoad($event)" (editorSwitched) = "changeEditor($event)" style="z-index: 9999">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
margin-top: -50px;
}


.registration-button {
margin-top: -10px;
margin-left: 25px;
float: right;
}

.button-row {
display: flex;
justify-content: space-between;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,19 @@ export class SubstanceFormStructureCardComponent extends SubstanceFormBase imple
}, () => { });
}

loadForm():void {
this.structureEditor.getSmiles().pipe(take(1)).subscribe(smiles => {

const navigationExtras: NavigationExtras = {
queryParams: {
importStructure: encodeURIComponent(smiles)
}
};
this.router.navigate(['/substances/register/chemical'], navigationExtras);
});

}

openStructureImageModal(): void {

const dialogRef = this.dialog.open(StructureImageModalComponent, {
Expand Down

0 comments on commit d93c6b7

Please sign in to comment.