ixfx
    Preparing search index...
    • Removes toRemove from sortedEvents.

      Consider holepunch if you want to create an empty hole in the events and maintain overall length of event series.

      After removing:

      • 'nothing': Gap is left, other items not affected
      • 'shuffle-following': Events after 'toRemove' are shifted back by duration of toRemove, maintaining their spacing after that
      • 'shuffle-leading': Events before 'toRemove' are shifted forward by duration of toRemove, maintaining their spacing before that
      • 'slice-following': Events after 'toRemove' are shifted back to start at toRemoved.start, maintaining their spacing after that
      • 'slice-leading': Events before 'toRemove' are shifted forward to end at toRemoved.end, maintaining their spacing before that

      Parameters

      • sortedEvents: Readonly<{ end: number; start: number }>[]
      • toRemove: EventItem
      • andThen:
            | "nothing"
            | "shuffle-following"
            | "shuffle-leading"
            | "slice-following"
            | "slice-leading"

      Returns Readonly<{ end: number; start: number }>[]