Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a8b13a2

Browse files
bug #11529 [WebProfilerBundle] Fixed double height of canvas (hason)
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
2 parents 0ecb34f + c689186 commit a8b13a2

File tree

1 file changed

+1
-5
lines changed
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector

1 file changed

+1
-5
lines changed

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@
193193
x = request.left * ratio + space, // position
194194
canvas = cache.get(elementId) || cache.set(elementId, document.getElementById(elementId)),
195195
ctx = canvas.getContext("2d"),
196-
backingStoreRatio,
197196
scaleRatio,
198197
devicePixelRatio;
199198
@@ -206,11 +205,8 @@
206205
207206
// For retina displays so text and boxes will be crisp
208207
devicePixelRatio = window.devicePixelRatio == "undefined" ? 1 : window.devicePixelRatio;
209-
backingStoreRatio = ctx.webkitBackingStorePixelRatio == "undefined" ? 1 : ctx.webkitBackingStorePixelRatio;
210208
scaleRatio = devicePixelRatio / 1;
211209
212-
canvasHeight += gapPerEvent * drawableEvents.length;
213-
214210
canvas.width = width * scaleRatio;
215211
canvas.height = canvasHeight * scaleRatio;
216212
@@ -363,7 +359,7 @@
363359
var self = this;
364360
365361
_requests.forEach(function(request) {
366-
self.drawOne(request, maxRequestTime, threshold, width);
362+
self.drawOne(request, _maxRequestTime, threshold, width);
367363
});
368364
};
369365

0 commit comments

Comments
 (0)