tEvents, worldX,
        worldMaxDist, selection) {
      const instantEvent = tr.b.findClosestElementInSortedArray(
          instantEvents,
          function(x) { return x.start; },
          worldX,
          worldMaxDist);

      if (!instantEvent) return;

      selection.push(instantEvent);
    }
  };

  return {
    Track,
  };
});
</script>
