Pan

Makes the scheduler's timeline pannable by dragging with the mouse. Try it out in the demo below.

Pan
//<code-header>
fiddle.title = 'Pan';
//</code-header>
const scheduler = new Scheduler({
    appendTo   : targetElement,
    autoHeight : true,

    features : {
        eventDragCreate : false,
        pan             : true
    },

    visibleDate : new Date(2021, 2, 1),
    startDate   : new Date(2021, 0, 1),
    endDate     : new Date(2021, 3, 1),

    columns : [
        { field : 'name', text : 'Name', width : 100 }
    ],

    resources : [
        { id : 1, name : 'Bernard' },
        { id : 2, name : 'Bianca' }
    ]
});

// Enable Pan
const scheduler = new Scheduler({
  features : {
    pan : true,
    eventDragCreate : false
  }
});

This feature is disabled by default. For info on enabling it, see GridFeatures.

Incompatible with the EventDragCreate and the EventDragSelect features.

Configs

12

Common

disabledInstancePlugin
listenersEvents

Other

Set to false to not pan horizontally when dragging in the time axis header

Set to false to not pan horizontally

Set to false to not pan vertically

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

19

Common

disabledInstancePlugin

Class hierarchy

isPan: Boolean= truereadonly
Identifies an object as an instance of Pan class, or subclass thereof.
isPan: Boolean= truereadonlystatic
Identifies an object as an instance of Pan class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Other

Set to false to not pan horizontally when dragging in the time axis header

Set to false to not pan horizontally

isActive: Booleanreadonly

Yields true if a pan gesture is in process.

vertical: Boolean= trueAlso a config

Set to false to not pan vertically

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Functions

28

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Events

6

Fires on the owning Scheduler or Gantt widget before pan starts. Return false to prevent the operation.

// Adding a listener using the "on" method
pan.on('beforePan', ({ event }) => {

});
ParameterTypeDescription
eventEvent

The native browser DOM event

catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

6

Called on the owning Scheduler or Gantt widget before pan starts. Return false to prevent the operation.

new Pan({
    onBeforePan({ event }) {

    }
});
ParameterTypeDescription
eventEvent

The native browser DOM event

onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

1