v7.3.0
SupportExamplesFree Trial

ProVerticalLayout

Handles the positioning of events within a resource column when the SchedulerPro is running in vertical mode. By default, overlapping events are arranged using the 'pack' algorithm which adjusts event widths to fit side by side within the column. You can override the default behavior by providing a custom layoutFn to calculate event positions and column widths yourself. Example usage:

new SchedulerPro({
    mode : 'vertical',
    eventLayout : {
        layoutFn(items, resource, scheduler) {
            items.forEach(item => {
                item.top = Math.round(Math.random() * 100);
                item.height = Math.round(Math.random() * 100);
            });

return 150; // The resource column width } } })

Useful configs

Config Description
type Layout algorithm: mixed, pack, or none
layoutFn Custom function for manual event positioning

See also

No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • type : 'mixed'/'pack'/'none'

    Type of vertical layout. Supported values are mixed, pack and none.

Source path

SchedulerPro/eventlayout/ProVerticalLayout.js

Contents