Skip to content

Commit

Permalink
bug #11529 [WebProfilerBundle] Fixed double height of canvas (hason)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

[WebProfilerBundle] Fixed double height of canvas

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7065
| License       | MIT
| Doc PR        | -

Commits
-------

c689186 [WebProfilerBundle] Fixed double height of canvas
  • Loading branch information
nicolas-grekas committed Aug 14, 2014
2 parents 0ecb34f + c689186 commit a8b13a2
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -363,7 +359,7 @@
var self = this;
_requests.forEach(function(request) {
self.drawOne(request, maxRequestTime, threshold, width);
self.drawOne(request, _maxRequestTime, threshold, width);
});
};
Expand Down

0 comments on commit a8b13a2

Please sign in to comment.