Skip to content

Commit

Permalink
Fixed number of decimals in tables
Browse files Browse the repository at this point in the history
  • Loading branch information
ikaros-project committed Sep 14, 2018
1 parent bca7b98 commit 1ffd1a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/WebUI/WebUIWidgetTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ class WebUIWidgetTable extends WebUIWidget
for(let j=0; j<size_y; j++)
for(let i=0; i<size_x; i++)
{
this.table.rows[j].cells[i].innerHTML = this.data[j][i];
this.table.rows[j].cells[i].style.color = this.getColor(i, this.data[j][i]); // use this.format.decimals
this.table.rows[j].cells[i].innerHTML = this.data[j][i].toFixed(this.parameters.decimals);
this.table.rows[j].cells[i].style.color = this.getColor(i, this.data[j][i]);
}
else
for(let j=0; j<size_y; j++)
for(let i=0; i<size_x; i++)
{
this.table.rows[j].cells[i].innerHTML = this.data[j][i];
this.table.rows[j].cells[i].style.color = this.getColor(i); // use this.format.decimals
this.table.rows[j].cells[i].innerHTML = this.data[j][i].toFixed(this.parameters.decimals);;
this.table.rows[j].cells[i].style.color = this.getColor(i);
}

}
Expand Down

0 comments on commit 1ffd1a8

Please sign in to comment.