Skip to content

Commit

Permalink
Merge pull request #8 from geneontology/nsa-initials
Browse files Browse the repository at this point in the history
NSA relation on the form
  • Loading branch information
tmushayahama authored Mar 14, 2024
2 parents 98a7165 + a720be6 commit 826b786
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/@noctua.common/scss/noctua-form.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ $noc-breakpoints: (
}

.noc-reference-cell {
@include deep-width(100px);
@include deep-width(80px);
@include noc-media-breakpoint("noc-lg") {
@include deep-width(80px);
}
}

.noc-with-cell {
@include deep-width(100px);
@include deep-width(80px);
@include noc-media-breakpoint("noc-lg") {
@include deep-width(80px);
}
Expand Down
2 changes: 1 addition & 1 deletion src/@noctua.form/data/data-generator-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class DataGeneratorUtils {
public static getDataJSON(data: any) {
const jsonData = JSON.stringify(data, null, 2);

console.log(jsonData)
// console.log(jsonData)

}

Expand Down
10 changes: 6 additions & 4 deletions src/@noctua.form/services/annotation-form.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class NoctuaAnnotationFormService {
private destroy$ = new Subject<void>();

// for setting edge when goterm is changed
private previousGotermValue: any = null
private previousGotermRelation: string = null

constructor(private _fb: FormBuilder, public noctuaFormConfigService: NoctuaFormConfigService,
private camService: CamService,
Expand Down Expand Up @@ -131,10 +131,12 @@ export class NoctuaAnnotationFormService {
this.destroy$.next();
//this.annotationForm.gpToTermEdge.setValue(edges[0]);

//console.log(this.annotationActivity.goterm?.term?.id, "--", this.previousGotermValue)
if (this.annotationActivity.goterm?.term?.id !== this.previousGotermValue) {
//console.log(this.annotationActivity.goterm, "--", this.previousGotermRelation)

const exists = edges.some(e => e.id === this.annotationActivity.gpToTermEdge?.id);
if (!exists) {
this.annotationForm.gpToTermEdge.setValue(edges[0]);
this.previousGotermValue = this.annotationActivity.goterm?.term.id;
this.previousGotermRelation = this.annotationActivity.gpToTermEdge?.id;
}

this.destroy$ = new Subject<void>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,14 @@ export class NoctuaFormConfigService {
activity.getEdges(edge.object.id).forEach((extensionEdge) => {
annotationActivity.extensionEdge = extensionEdge.predicate.edge;
annotationActivity.extension = extensionEdge.object;

});
}
});
}
}

const edgeId = this.findEdge(criteria.gpToTermPredicate);
const inverseEdgeId = annotationActivity.findEdgeByCriteria(criteria);

const inverseEdge = this.findEdge(inverseEdgeId);

if (edgeId && inverseEdge) {
Expand Down Expand Up @@ -467,7 +466,6 @@ export class NoctuaFormConfigService {
return predicates.map((predicate) => {
return this.findEdge(predicate);
});

}

setTermLookup(activityNode: ActivityNode, goCategories: GoCategory[]) {
Expand Down Expand Up @@ -502,7 +500,6 @@ export class NoctuaFormConfigService {
return ModelDefinition.addNodeShex(activity, subjectNode, predExpr, objectNode);
}


insertActivityNodeShex(activity: Activity,
subjectNode: ActivityNode,
predExpr: ShapeDescription.PredicateExpression,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@
<span class="">
<strong *ngIf="annotationActivity.goterm.predicate?.isComplement"> NOT </strong>
<span>{{annotationActivity.gpToTermEdge.inverseEntity?.label}}</span>

</span>

<!-- <noctua-inline-editor [cam]="cam" [activity]='annotationActivity.activity' [entity]="annotationActivity.gp"
[category]="EditorCategory.relationship" [relationshipChoices]="annotationActivity.gpToTermEdges"
class="noc-edit-button">
</noctua-inline-editor> -->
<noctua-inline-editor *ngIf="false" [cam]="cam" [activity]='annotationActivity.activity'
[entity]="annotationActivity.gp" [category]="EditorCategory.relationship"
[relationshipChoices]="annotationActivity.gpToTermEdges" class="noc-edit-button">
</noctua-inline-editor>
</div>

<div class="noc-term-cell noc-entity-cell" fxLayout="column" fxLayoutAlign="start stretch" fxFlex=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<div class="noc-annotation-table w-100-p" fxLayout="column" fxLayoutAlign="start start">
<div class="noc-table-header w-100-p" fxLayout="row" fxLayoutAlign="start center">

<div class="noc-cell noc-gp-cell" fxFlex="">
<div class="noc-cell noc-annotation-gp-cell" fxFlex="">
Gene Product
</div>
<div class="noc-cell noc-relation-cell">
Expand All @@ -52,7 +52,7 @@
With
</div>
</div>
<div class="noc-cell noc-extension-cell">
<div class="noc-cell noc-annotation-extension-cell" fxFlex="">
Extension
</div>
<div class="noc-cell noc-comments-cell">
Expand Down
2 changes: 1 addition & 1 deletion workbenches/noctua-standard-annotations/public/inject.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,6 @@
</div>
</noctua-splash-screen>
<noctua-root></noctua-root>
<script src="runtime.38b1f495cb4cd82a.js" type="module"></script><script src="polyfills.a39db01cea6f891e.js" type="module"></script><script src="scripts.c2b224063cd8b44d.js" defer></script><script src="main.415d98d6f7eb9a48.js" type="module"></script>
<script src="runtime.38b1f495cb4cd82a.js" type="module"></script><script src="polyfills.a39db01cea6f891e.js" type="module"></script><script src="scripts.c2b224063cd8b44d.js" defer></script><script src="main.645beca9aef948b9.js" type="module"></script>

</body></html>

Large diffs are not rendered by default.

0 comments on commit 826b786

Please sign in to comment.