HorizontalLayout

Base class for horizontal layouts (HorizontalLayoutPack and HorizontalLayoutStack). Should not be used directly, instead specify eventLayout in Scheduler config (stack, pack or none):

let scheduler = new Scheduler({
  eventLayout: 'stack'
});

Functions

2

This method performs layout on an array of event render data and returns amount of bands. Band is a multiplier of a configured rowHeight to calculate total row height required to fit all events. This method should not be used directly, it is called by the Scheduler during the row rendering process.

ParameterTypeDescription
eventsEventRenderData[]

Unordered array of event render data, sorting may be required

resourceResourceModel

The resource for which the events are being laid out.

Returns: Number

This method iterates over events and calculates top position for each of them. Default layouts calculate positions to avoid events overlapping horizontally (except for the 'none' layout). Pack layout will squeeze events to a single row by reducing their height, Stack layout will increase the row height and keep event height intact. This method should not be used directly, it is called by the Scheduler during the row rendering process.

ParameterTypeDescription
eventsEventRenderData[]

Unordered array of event render data, sorting may be required

resourceResourceModel

The resource for which the events are being laid out.

schedulerScheduler

The scheduler instance

heightRunBoolean

Passed as true when called during the initial row height calculation pass