Hover CPU slices
Tracks get optional onMouseMove and onMouseOut methods which are called
with track-specific event coordinates from the TrackComponent.
The CpuSliceTrack uses these coordinates to find and highlight the
currently hovered slice.
Screenshot: https://screenshot.googleplex.com/yzNOmJqpnBp
Change-Id: Ibf67646607e3a1a5b8744d0e3e2738d8c0f68031
diff --git a/ui/src/frontend/track.ts b/ui/src/frontend/track.ts
index 14a42fe..aaad16b 100644
--- a/ui/src/frontend/track.ts
+++ b/ui/src/frontend/track.ts
@@ -45,4 +45,6 @@
abstract renderCanvas(
ctx: CanvasRenderingContext2D, timeScale: TimeScale,
visibleWindowMs: {start: number, end: number}): void;
+ onMouseMove(_position: {x: number, y: number}) {}
+ onMouseOut() {}
}