Commit 62acef54 authored by Sathya Gunasekaran's avatar Sathya Gunasekaran Committed by V8 LUCI CQ

[system-analyzer] Fix zoom

Don't render if the timeline track doesn't have any data.

Change-Id: Ib0638ce18391f14212d3a5385d90877cf0392c5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3162042Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76843}
parent 45fc1486
......@@ -170,6 +170,9 @@ export class TimelineTrackBase extends V8CustomElement {
}
_updateDimensions() {
// No data in this timeline, no need to resize
if (!this._timeline) return;
const centerOffset = this._timelineBoundingClientRect.width / 2;
const time =
this.relativePositionToTime(this._timelineScrollLeft + centerOffset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment