[WebProfilerBundle] Fixed double height of canvas
This commit is contained in:
parent
7d7b5c724f
commit
c689186674
@ -193,7 +193,6 @@
|
|||||||
x = request.left * ratio + space, // position
|
x = request.left * ratio + space, // position
|
||||||
canvas = cache.get(elementId) || cache.set(elementId, document.getElementById(elementId)),
|
canvas = cache.get(elementId) || cache.set(elementId, document.getElementById(elementId)),
|
||||||
ctx = canvas.getContext("2d"),
|
ctx = canvas.getContext("2d"),
|
||||||
backingStoreRatio,
|
|
||||||
scaleRatio,
|
scaleRatio,
|
||||||
devicePixelRatio;
|
devicePixelRatio;
|
||||||
|
|
||||||
@ -206,11 +205,8 @@
|
|||||||
|
|
||||||
// For retina displays so text and boxes will be crisp
|
// For retina displays so text and boxes will be crisp
|
||||||
devicePixelRatio = window.devicePixelRatio == "undefined" ? 1 : window.devicePixelRatio;
|
devicePixelRatio = window.devicePixelRatio == "undefined" ? 1 : window.devicePixelRatio;
|
||||||
backingStoreRatio = ctx.webkitBackingStorePixelRatio == "undefined" ? 1 : ctx.webkitBackingStorePixelRatio;
|
|
||||||
scaleRatio = devicePixelRatio / 1;
|
scaleRatio = devicePixelRatio / 1;
|
||||||
|
|
||||||
canvasHeight += gapPerEvent * drawableEvents.length;
|
|
||||||
|
|
||||||
canvas.width = width * scaleRatio;
|
canvas.width = width * scaleRatio;
|
||||||
canvas.height = canvasHeight * scaleRatio;
|
canvas.height = canvasHeight * scaleRatio;
|
||||||
|
|
||||||
@ -363,7 +359,7 @@
|
|||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
_requests.forEach(function(request) {
|
_requests.forEach(function(request) {
|
||||||
self.drawOne(request, maxRequestTime, threshold, width);
|
self.drawOne(request, _maxRequestTime, threshold, width);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user