Commit 06ed92ef authored by alph's avatar alph Committed by Commit bot

DevTools: Make sure a entry of flamechart is visible after reveal

Currently is was shown right on the window border and thus invisible.

Review-Url: https://codereview.chromium.org/2784843003
Cr-Commit-Position: refs/heads/master@{#460528}
parent 1653e00e
......@@ -213,6 +213,9 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
var y = this._levelToHeight(timelineData.entryLevels[entryIndex]);
this.setScrollOffset(y, this._barHeight);
var minVisibleWidthPx = 30;
var futurePixelToTime = (timeRight - timeLeft) / this._offsetWidth;
minEntryTimeWindow = Math.max(minEntryTimeWindow, futurePixelToTime * minVisibleWidthPx);
if (timeLeft > entryEndTime) {
var delta = timeLeft - entryEndTime + minEntryTimeWindow;
this._flameChartDelegate.requestWindowTimes(timeLeft - delta, timeRight - delta);
......
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