Fix the scale of the search markers (#55731)
The search markers where placed on the minimap using a different scale than the density chart and time ruler. That made the log stream jump to unexpected time positions when the user clicked on a search marker. This also fixes an problem where the search markers didn't move alongside the rest of the minimap when the user dragged and dropped it.
This commit is contained in:
parent
d3151327de
commit
d40269c748
|
@ -215,6 +215,15 @@ export class LogMinimap extends React.Component<LogMinimapProps, LogMinimapState
|
|||
height={overscanHeight}
|
||||
tickCount={tickCount}
|
||||
/>
|
||||
|
||||
<SearchMarkers
|
||||
buckets={summaryHighlightBuckets || []}
|
||||
start={minTime}
|
||||
end={maxTime}
|
||||
width={width}
|
||||
height={overscanHeight}
|
||||
jumpToTarget={jumpToTarget}
|
||||
/>
|
||||
</g>
|
||||
{highlightedInterval ? (
|
||||
<HighlightedInterval
|
||||
|
@ -225,16 +234,6 @@ export class LogMinimap extends React.Component<LogMinimapProps, LogMinimapState
|
|||
target={target}
|
||||
/>
|
||||
) : null}
|
||||
<g transform={`translate(${width * 0.5}, 0)`}>
|
||||
<SearchMarkers
|
||||
buckets={summaryHighlightBuckets || []}
|
||||
start={minTime}
|
||||
end={maxTime}
|
||||
width={width / 2}
|
||||
height={height}
|
||||
jumpToTarget={jumpToTarget}
|
||||
/>
|
||||
</g>
|
||||
<TimeCursor x1={width / 3} x2={width} y1={timeCursorY} y2={timeCursorY} />
|
||||
<DragTargetArea
|
||||
isGrabbing={Boolean(drag)}
|
||||
|
|
|
@ -36,7 +36,7 @@ export class SearchMarkers extends React.PureComponent<SearchMarkersProps, {}> {
|
|||
.range([0, height]);
|
||||
|
||||
return (
|
||||
<g className={classes}>
|
||||
<g transform={`translate(${width / 2}, 0)`} className={classes}>
|
||||
{buckets.map(bucket => (
|
||||
<g
|
||||
key={`${bucket.representativeKey.time}:${bucket.representativeKey.tiebreaker}`}
|
||||
|
|
Loading…
Reference in a new issue