[WebProfilerBundle] Fixed double height of canvas

This commit is contained in:
Martin Hasoň 2014-07-31 16:08:09 +02:00
parent 7d7b5c724f
commit c689186674
1 changed files with 1 additions and 5 deletions

View File

@ -193,7 +193,6 @@
x = request.left * ratio + space, // position
canvas = cache.get(elementId) || cache.set(elementId, document.getElementById(elementId)),
ctx = canvas.getContext("2d"),
backingStoreRatio,
scaleRatio,
devicePixelRatio;
@ -206,11 +205,8 @@
// For retina displays so text and boxes will be crisp
devicePixelRatio = window.devicePixelRatio == "undefined" ? 1 : window.devicePixelRatio;
backingStoreRatio = ctx.webkitBackingStorePixelRatio == "undefined" ? 1 : ctx.webkitBackingStorePixelRatio;
scaleRatio = devicePixelRatio / 1;
canvasHeight += gapPerEvent * drawableEvents.length;
canvas.width = width * scaleRatio;
canvas.height = canvasHeight * scaleRatio;
@ -363,7 +359,7 @@
var self = this;
_requests.forEach(function(request) {
self.drawOne(request, maxRequestTime, threshold, width);
self.drawOne(request, _maxRequestTime, threshold, width);
});
};