Skip to content

@eightkk/vue-weave / core / timelineBarsInRange

Function: timelineBarsInRange() ​

timelineBarsInRange<B>(bars, range, options?): B[]

Defined in: src/core/timeRangeTargets.ts:32

Returns the bars that are worked on in the half-open time range [range.start, range.end), in input order. A bar with segments is active only when one of its work segments overlaps the range, so a pause (a gap between segments) that covers the whole range does not count; any other bar is active when its interval overlaps the range. A milestone (start === end) at time t is active when range.start <= t < range.end. An empty range (start === end) is an instant t: it matches work with start <= t < end and milestones at exactly t. options.rowIds restricts the result to bars of those rows. The times are not inferred from anything else, such as a graph. Throws RangeError for a range or bar time that is not finite or ends before it starts, and for invalid segments. The inputs are not modified.

Type Parameters ​

B ​

B extends TimelineBarActivity

Parameters ​

bars ​

readonly B[]

range ​

TimeRange

options? ​

TimelineBarsInRangeOptions = {}

Returns ​

B[]

Released under the MIT License.