TimelineZoomable
Mixin
Mixin providing legacy "zooming" functionality. For a nicer UX, we recommend opting in to smooth zooming instead, which will be the default from v8.
Legacy zooming
The zoom levels are stored as instances of ViewPresets, and are cached centrally in the PresetManager.
The default presets are loaded into the presets store upon Scheduler instantiation. Preset selection is covered in the TimelineViewPresets mixin.
To specify custom zoom levels please provide a set of view presets to the global PresetManager store before scheduler creation, or provide a set of view presets to a specific scheduler only:
const myScheduler = new Scheduler({
presets : [
{
base : 'hourAndDay',
id : 'MyHourAndDay',
// other preset configs....
},
{
base : 'weekAndMonth',
id : 'MyWeekAndMonth',
// other preset configs....
}
],
viewPreset : 'MyHourAndDay',
// other scheduler configs....
});
Smooth zooming
See TimelineSmoothZoom for information on the smooth zooming system, which is opt-in and will be the default in v8. To enable:
const myScheduler = new Scheduler({
smoothZoom : true,
// other scheduler configs....
});
See also
- TimelineViewPresets - View preset handling
- PresetStore - Preset store (zoom levels)
- Scheduler - Scheduler widget
- TimelineSmoothZoom - Smooth zoom functionality
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
Integer number indicating the size of timespan during zooming. When zooming, the timespan is adjusted to make the scrolling area
visibleZoomFactortimes wider than the timeline area itself. Used in zoomToSpan and zoomToLevel functions. -
Whether the originally rendered timespan should be preserved while zooming. By default, it is set to
false, meaning the timeline panel will adjust the currently rendered timespan to limit the amount of HTML content to render. When setting this option totrue, be careful not to allow to zoom a big timespan in seconds resolution for example. That will cause a lot of HTML content to be rendered and affect performance. You can use minZoomLevel and maxZoomLevel config options for that. -
If
true, you can zoom in and out on the time axis using CTRL + mouse wheel. -
If
true, you can zoom to a time span by double-clicking a time axis cell.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of TimelineZoomable class, or subclass thereof.
-
Identifies an object as an instance of TimelineZoomable class, or subclass thereof.
-
Get/set the maxZoomLevel value
Has a corresponding maxZoomLevel config.
-
Sets the minZoomLevel value
Has a corresponding minZoomLevel config.