Skip to content

Commit

Permalink
merged development_3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Newatia authored and Newatia committed Sep 27, 2023
2 parents c44068b + e06eae3 commit dc9387f
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
@import '../../../../styles/table';
@import '../../../../styles/table';



.disabled {
color: var(--box-shadow-color-5);
background-color: var(--box-shadow-color-3);
cursor: pointer;
&:hover {
cursor: pointer !important;
}
}

.disabled:hover {
cursor: pointer !important;

}

.disabled-btn {
color: var(--box-shadow-color-5);
background-color: var(--box-shadow-color-3);
cursor: pointer;
&:hover {
cursor: pointer !important;
}
}

.disabled-btn:hover {
cursor: pointer !important;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.disabled {
color: var(--box-shadow-color-5);
background-color: var(--box-shadow-color-3);
cursor: pointer;
&:hover {
cursor: pointer !important;
}
}

.disabled:hover {
cursor: pointer !important;

}

.disabled-btn {
color: var(--box-shadow-color-5);
background-color: var(--box-shadow-color-3);
cursor: pointer;
&:hover {
cursor: pointer !important;
}
}

.disabled-btn:hover {
cursor: pointer !important;

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Subscription } from 'rxjs';
import { SubstanceService } from '@gsrs-core/substance/substance.service';
import { SubstanceFormStructuralUnitsService } from '../structural-units/substance-form-structural-units.service';
import { SubstanceFormStructureService } from './substance-form-structure.service';
import { ActivatedRoute } from '@angular/router';

@Component({
selector: 'app-substance-form-structure-card',
Expand Down Expand Up @@ -44,7 +45,8 @@ export class SubstanceFormStructureCardComponent extends SubstanceFormBase imple
private overlayContainerService: OverlayContainer,
private gaService: GoogleAnalyticsService,
private substanceService: SubstanceService,
private substanceFormStructuralUnitsService: SubstanceFormStructuralUnitsService
private substanceFormStructuralUnitsService: SubstanceFormStructuralUnitsService,
private activatedRoute: ActivatedRoute
) {
super();
}
Expand All @@ -56,6 +58,7 @@ export class SubstanceFormStructureCardComponent extends SubstanceFormBase imple
if (this.substanceType === 'polymer') {
this.menuLabelUpdate.emit('Idealized Structure');
const idealStructSubscription = this.substanceFormStructureService.substanceIdealizedStructure.subscribe(structure => {
console.log(structure);
if (structure) {
this.structure = structure;
} else {
Expand All @@ -72,6 +75,8 @@ export class SubstanceFormStructureCardComponent extends SubstanceFormBase imple
} else {
this.menuLabelUpdate.emit('Structure');
const structSubscription = this.substanceFormStructureService.substanceStructure.subscribe(structure => {
console.log(structure);

this.structure = structure;
this.loadStructure();
});
Expand Down Expand Up @@ -123,6 +128,12 @@ export class SubstanceFormStructureCardComponent extends SubstanceFormBase imple
this.structureEditor.setMolecule(this.structure.molfile);
this.smiles = this.structure.smiles;
this.mol = this.structure.molfile;
// imported structures from search results require a second structure refresh to display stereochemistry and other calculated fields
if ( this.activatedRoute && this.activatedRoute.snapshot.queryParams && this.activatedRoute.snapshot.queryParams['importStructure']) {
setTimeout(()=>{
this.updateStructureForm(this.structure.molfile), 2000
});
}
this.isInitializing = false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</button>
</div>
</div>
<div class="mat-elevation-z2" style = "display:flex;flex-direction:column" *ngIf="smiles">
<div class="mat-elevation-z2 smiles-structure-result" style = "" *ngIf="smiles">
<div style = "width:100%">
<div>
<span class="capitalized font-medium-bold no-break">{{structureSearchTerm && searchType}} Query:</span>
Expand All @@ -57,10 +57,10 @@
</span>
<span class="actions-container">
<button mat-icon-button color="primary" (click)="editStructureSearch()">
<mat-icon svgIcon="edit"></mat-icon>
<mat-icon svgIcon="edit" matTooltip = "edit structure search parameters"></mat-icon>
</button>
<button mat-icon-button color="primary" (click)="clearStructureSearch()">
<mat-icon svgIcon="delete_forever"></mat-icon>
<mat-icon svgIcon="delete_forever" matTooltip = "clear structure search parameters"></mat-icon>
</button>
</span>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -727,3 +727,10 @@ margin-left: 20px;
.cdk-overlay-backdrop, .cdk-global-overlay-wrapper {
display: none !important;
}


.smiles-structure-result {
display:flex;
flex-direction:column;
max-width: 650px;
}

0 comments on commit dc9387f

Please sign in to comment.