Apply suggestions from code review
Co-authored-by: Dmitry Gozman <dgozman@gmail.com> Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
parent
b07e5aa927
commit
bd654db9c0
|
|
@ -29,7 +29,7 @@ import type { ConsoleEntry } from './consoleTab';
|
||||||
type TimelineBar = {
|
type TimelineBar = {
|
||||||
action?: ActionTraceEventInContext;
|
action?: ActionTraceEventInContext;
|
||||||
resource?: Entry;
|
resource?: Entry;
|
||||||
consoleMessage?: ConsoleEntry
|
consoleMessage?: ConsoleEntry;
|
||||||
leftPosition: number;
|
leftPosition: number;
|
||||||
rightPosition: number;
|
rightPosition: number;
|
||||||
leftTime: number;
|
leftTime: number;
|
||||||
|
|
@ -116,7 +116,7 @@ export const Timeline: React.FunctionComponent<{
|
||||||
for (const bar of bars) {
|
for (const bar of bars) {
|
||||||
if (highlightedAction)
|
if (highlightedAction)
|
||||||
bar.active = bar.action === highlightedAction;
|
bar.active = bar.action === highlightedAction;
|
||||||
if (highlightedEntry)
|
else if (highlightedEntry)
|
||||||
bar.active = bar.resource === highlightedEntry;
|
bar.active = bar.resource === highlightedEntry;
|
||||||
else if (highlightedConsoleEntry)
|
else if (highlightedConsoleEntry)
|
||||||
bar.active = bar.consoleMessage === highlightedConsoleEntry;
|
bar.active = bar.consoleMessage === highlightedConsoleEntry;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue