Skip to content

Commit 0d1fcdd

Browse files
committed
Merge pull request php-debugbar#211 from nsams/patch-1
Improve accuracy of Timeline
2 parents 8318a65 + 43fb13c commit 0d1fcdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DebugBar/Resources/widgets.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ if (typeof(PhpDebugBar) == 'undefined') {
367367
var measure = data.measures[i];
368368
var m = $('<div />').addClass(csscls('measure')),
369369
li = $('<li />'),
370-
left = Math.round(measure.relative_start * 100 / data.duration),
371-
width = Math.min(Math.round(measure.duration * 100 / data.duration), 100 - left);
370+
left = (measure.relative_start * 100 / data.duration).toFixed(2),
371+
width = Math.min((measure.duration * 100 / data.duration).toFixed(2), 100 - left);
372372

373373
m.append($('<span />').addClass(csscls('value')).css({
374374
left: left + "%",

0 commit comments

Comments
 (0)