Skip to content

Commit

Permalink
Filter gap states.
Browse files Browse the repository at this point in the history
If a state is filtered out, don't create a new state for it.  Filtered
states are represented by a tags = 4, and filtered and dimmed are
represented by tags = 5.

Signed-off-by: William Yang <[email protected]>
  • Loading branch information
williamsyang-work authored and PatrickTasse committed Sep 19, 2024
1 parent 1ef4e42 commit 8dd40ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion timeline-chart/src/layer/time-graph-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,13 @@ export class TimeGraphChart extends TimeGraphChartLayer {

protected updateGap(state: TimelineChart.TimeGraphState, rowComponent: TimeGraphRow, gapStyle: any, x: number, lastX?: number, lastTime?: bigint, lastBlank?: boolean) {
/* add gap if there is visible space between states or if there is a time gap between two blank states */
if (lastX && lastTime && (x > lastX || (lastBlank && !state.data?.style && state.range.start > lastTime))) {
const isFilteredOut = state.data?.tags >= 4;
if (
lastX &&
lastTime &&
(x > lastX || (lastBlank && !state.data?.style && state.range.start > lastTime)) &&
!isFilteredOut
) {
const gap = state.data?.gap;
if (gap) {
const width = Math.max(1, x - lastX);
Expand Down

0 comments on commit 8dd40ff

Please sign in to comment.