v7.3.0

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

No results

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 visibleZoomFactor times 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 to true, 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
  • isTimelineZoomable : Booleantrue
    READONLY
    ADVANCED
    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.

Functions

Functions are methods available for calling on the class

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    Type definitions

    Source path

    Scheduler/view/mixin/TimelineZoomable.js

    Contents