More efficient sample counting
This commit is contained in:
parent
014ddcc2d7
commit
06892f0a84
@ -74,10 +74,12 @@ export class HomeComponent implements OnInit {
|
||||
countSamples(data: any) {
|
||||
this.keys.map(key => key.count = 0);
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
this.keys.forEach(key => {
|
||||
this.keys.every(key => {
|
||||
if (key.id === data[i].material.group) {
|
||||
key.count += 1;
|
||||
key.count++;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
this.updateGraph();
|
||||
|
Loading…
Reference in New Issue
Block a user