Skip to content

Commit

Permalink
fix: update link/uberon numbers on changing degree
Browse files Browse the repository at this point in the history
  • Loading branch information
hrishikeshpaul committed Jul 30, 2020
1 parent f996274 commit d2ee28d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/services/sheet.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ export class Marker {
export class Cell {
structure: string;
parents: Array<string>;
link: string;

constructor(structure: string) {
constructor(structure: string, link='NONE') {
this.structure = structure;
this.parents = [];
this.link = link;
}
}

Expand Down Expand Up @@ -327,7 +329,7 @@ export class SheetService {
cells[i].toLowerCase().trim()
);
if (foundCell === -1) {
const nc = new Cell(cells[i].trim());
const nc = new Cell(cells[i].trim(), row[this.sheet.cell_col + this.sheet.uberon_col]);
nc.parents.push(parent.toLowerCase());
cellDegrees.push(nc);
} else {
Expand Down Expand Up @@ -370,7 +372,7 @@ export class SheetService {
}
}
} else {
const nc = new Cell(cells[c].trim());
const nc = new Cell(cells[c].trim(), row[this.sheet.cell_col + this.sheet.uberon_col]);
nc.parents.push(...markers);
cellDegrees.push(nc);
}
Expand Down

0 comments on commit d2ee28d

Please sign in to comment.