mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-12 17:45:49 +08:00
DevTools: Make performance monitor scrolling smooth again.
Change-Id: I1185b15c655d2f37c9a5e36a4283ce81b971660a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594487 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Alexei Filippov <alph@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#656609} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 22db2f5f4be55240e7fb2a26589c5cd82a69b8c7
This commit is contained in:
committed by
Commit Bot
parent
5af6a02a5e
commit
c80db1dc61
@@ -157,10 +157,10 @@ PerformanceMonitor.PerformanceMonitor = class extends UI.HBox {
|
||||
if (x < -50)
|
||||
break;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(Math.round(x) + 0.5, 0);
|
||||
ctx.lineTo(Math.round(x) + 0.5, this._height);
|
||||
ctx.moveTo(x, 0);
|
||||
ctx.lineTo(x, this._height);
|
||||
if (sec >= 0 && sec % labelDistanceSeconds === 0)
|
||||
ctx.fillText(new Date(sec * 1000).toLocaleTimeString(), Math.round(x) + 4, 12);
|
||||
ctx.fillText(new Date(sec * 1000).toLocaleTimeString(), x + 4, 12);
|
||||
ctx.strokeStyle = sec % labelDistanceSeconds ? lightGray : this._gridColor;
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user