Skip to content

Commit

Permalink
Fixed tltv#95 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
voltor committed Jul 30, 2020
1 parent 50f9a58 commit a181aed
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,7 @@ public void updateWidths() {
* current resolution.
*/
private double calculateDayOrHourResolutionBlockWidthPx(int blockCount) {
double dayOrHourWidthPx = Math.round(resolutionDiv.getClientWidth() / blockCount);
while ((resolutionDiv.getClientWidth() % (blockCount * dayOrHourWidthPx)) >= blockCount) {
dayOrHourWidthPx++;
}

return dayOrHourWidthPx;
return Math.round( ( resolutionDiv.getClientWidth()*10000 ) / blockCount) / 10000d;
}

/*
Expand Down

0 comments on commit a181aed

Please sign in to comment.