DayPilot.Gantt.snapToGrid

The snapToGrid property (boolean) determines whether task boxes snap to grid cells during moving and resizing.

Declaration

DayPilot.Gantt.snapToGrid

Default Value

true

Notes

When set to true, task boxes snap to grid cell boundaries during moving and resizing. When set to false, moving and resizing can continue without grid snapping.

Examples

JavaScript

const gantt = new DayPilot.Gantt("dp", {
  snapToGrid: false,
  // ...
});
gantt.init();

Angular

<daypilot-gantt [config]="config"></daypilot-gantt>
config: DayPilot.GanttConfig = {
  snapToGrid: false,
  // ...
};

React

<DayPilotGantt
  snapToGrid={false}
  {/* ... */}
/>

Vue

<DayPilotGantt
  :snapToGrid="false"
  <!-- ... -->
/>

See Also

DayPilot.Gantt Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript