Skip to content

@eightkk/vue-weave / core / applyTimelineConstraintEdit

Function: applyTimelineConstraintEdit() ​

applyTimelineConstraintEdit<B>(bars, change): B[]

Defined in: src/core/timeline.ts:82

Apply a GanttChart constraint-edit proposal: returns a new array in which the bar change.id is a copy with constraints[change.kind] set to change.after, or without it when after is undefined (the constraints field is left out once it is empty). Other bars are the same objects. The input is not modified. Throws an Error for an unknown bar or kind and a RangeError for an after that is not a finite time. before is not compared with the bar.

Type Parameters ​

B ​

B extends TimelineBar<unknown>

Parameters ​

bars ​

readonly B[]

change ​

TimelineConstraintEdit

Returns ​

B[]

Released under the MIT License.