1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-16 21:08:34 +01:00

Merge pull request #211 from nsams/patch-1

Improve accuracy of Timeline
This commit is contained in:
Barry vd. Heuvel 2015-04-21 13:06:08 +02:00
commit 0d1fcdd087

View File

@ -367,8 +367,8 @@ if (typeof(PhpDebugBar) == 'undefined') {
var measure = data.measures[i];
var m = $('<div />').addClass(csscls('measure')),
li = $('<li />'),
left = Math.round(measure.relative_start * 100 / data.duration),
width = Math.min(Math.round(measure.duration * 100 / data.duration), 100 - left);
left = (measure.relative_start * 100 / data.duration).toFixed(2),
width = Math.min((measure.duration * 100 / data.duration).toFixed(2), 100 - left);
m.append($('<span />').addClass(csscls('value')).css({
left: left + "%",