Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/viscoll #217

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Feature/viscoll #217

wants to merge 13 commits into from

Conversation

acaleo5
Copy link
Collaborator

@acaleo5 acaleo5 commented Mar 14, 2023

No description provided.

terms: Array<term> = [];
Data: any;

constructor(private http: HttpClient) { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better

constructor(
          ...
   ){
  }

Comment on lines 112 to 117
let observable = this.http.get('./assets/data/visColl.json');
observable.subscribe({next: (data:any)=> {
this.Data=data;
}
});
observable.subscribe(() => this.assignmentcycle());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Join the two subscribes into one


assignmentcycle() {
for (let rectocounter in this.Data.Rectos) {
let side=JSON.parse(JSON.stringify(this.sampleSide));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why double encoding?

Comment on lines 149 to 173
for (let termcounter in this.Data.Terms) {
let term=JSON.parse(JSON.stringify(this.sampleTerm));
term=JSON.parse(JSON.stringify(this.Data.Terms[termcounter]));
this.terms.push(term);

for (let quirenumber in term.objects.Group) {
this.quires[Number(term.objects.Group[quirenumber])-1].terms.push(term);
};


for (let leafnumber in term.objects.Leaf) {
this.leaves[Number(term.objects.Leaf[leafnumber])-1].terms.push(term);
};


for (let rectonumber in term.objects.Recto) {
this.rectos[Number(term.objects.Recto[rectonumber])-1].terms.push(term);
};

for (let versonumber in term.objects.Verso) {
this.versos[Number(term.objects.Verso[versonumber])-1].terms.push(term);
};
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor using arr.map

export class vceside {
sidedata:sidedataType;
terms:Array<term>;
constructor(){}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove line

memberleaves:Array<vceleaf>;
quireImg:string;
terms:Array<term>;
constructor(){}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all empty constructors

terms:Array<term>;
constructor(){}
}
export class term {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capitalize every class and interface type names

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants