TimelineContext
This class encapsulates a schedule timeline tick context based on a DOM event. This will include the row and resource information and the tick and time information for a DOM pointer event detected in the timeline.
scheduler.on('scheduleClick', (context) => {
console.log('Clicked date:', context.date);
console.log('Resource:', context.resourceRecord.name);
console.log('Tick index:', context.tickIndex);
});
Useful configs and functions
| Member | Description |
|---|---|
| date | Date at the pointer position |
| resourceRecord | Resource record at the pointer position |
| eventRecord | Event record at the pointer (if any) |
| tick | Tick data object at the pointer position |
| row | Grid row at the pointer position |
| domEvent | Original DOM event |
See also
- ScheduleContext - Schedule cell selection feature
- Scheduler - Scheduler widget
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The contextual assignment record (if any)
Has a corresponding runtime assignmentRecord property.
-
The cell element under the
domEventHas a corresponding runtime cellElement property.
-
The DOM event which triggered the context change.
Has a corresponding runtime domEvent property.
-
If the
domEventwas on an event bar, this will be the event bar element.Has a corresponding runtime eventElement property.
-
The contextual event record (if any)
Has a corresponding runtime eventRecord property.
-
The contextual record
Has a corresponding runtime record property.
-
The contextual resource record (if any)
Has a corresponding runtime resourceRecord property.
-
The contextual row index
Has a corresponding runtime rowIndex property.
-
The owning scheduler/gantt widget.
Has a corresponding runtime scheduler property.
-
The end date of the contextual tick.
Has a corresponding runtime tickEndDate property.
-
The contextual tick index. This may be fractional.
Has a corresponding runtime tickIndex property.
-
The start date of the contextual tick.
Has a corresponding runtime tickStartDate property.
-
The date corresponding as close as can be determined to the
domEventposition in the timelineHas a corresponding runtime time property.
Properties
Properties are getters/setters or publicly accessible variables on this class-
The contextual assignment record (if any)
Has a corresponding assignmentRecord config.
-
The cell element under the
domEventHas a corresponding cellElement config.
-
The DOM event which triggered the context change.
Has a corresponding domEvent config.
-
If the
domEventwas on an event bar, this will be the event bar element.Has a corresponding eventElement config.
-
The contextual event record (if any)
Has a corresponding eventRecord config.
-
The contextual record
Has a corresponding record config.
-
The contextual resource record (if any)
Has a corresponding resourceRecord config.
-
The contextual row index
Has a corresponding rowIndex config.
-
The owning scheduler/gantt widget.
Has a corresponding scheduler config.
-
The end date of the contextual tick.
Has a corresponding tickEndDate config.
-
The contextual tick index. This may be fractional.
Has a corresponding tickIndex config.
-
The integer contextual tick index.
-
The start date of the contextual tick.
Has a corresponding tickStartDate config.
-
The date corresponding as close as can be determined to the
domEventposition in the timelineHas a corresponding time config.