search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

snapToGrid not working

Asked by Mauricio Farinelli
7 years ago.

Hi,
I was trying to apply snapToGrid false in our Scheduler (to be able to resize events by minutes), but it is really not working. Maybe is some other config property that is blocking it.

Our config has:
{
bubbles: Object,
enableCurrentTimeIndicator: false,
intervals: Object,
isEventEditable:function isEventEditable(event),
onAfterEventRender:function onAfterEventRender(args),
onBeforeCellRender:function onBeforeCellRender(args),
onBeforeEventRender:function onBeforeEventRender(args),
onBeforeResHeaderRender:function onBeforeResHeaderRender(args),
onCellMouseDown:function onCellMouseDown(event, mouseButton, originalEvent),
onClickGridShift: function onClickGridShift(rec),
onEditShiftCompleted:function onEditShiftCompleted(args, editedShift),
onEventClick: function onEventClick(args),
onEventDoubleClick: function onEventDoubleClick(event),
onEventResize: function onEventResize(event),
onEventResized:function onEventResized(event),
onEventRightClick: function onEventRightClick(args),
onHeaderButtonClicked:function onHeaderButtonClicked(elementId),
onHeaderDragged: function onHeaderDragged(args),
onRenderHeader: function onRenderHeader(args),
onResourceSelected: function onResourceSelected(recordsSelected, mouseButton, originalEvent),
onRowDoubleClick:function onRowDoubleClick(e),
onScrollContentChange:function,
onTimeRangeClick: function onTimeRangeClick(args),
onTimeRangeDoubleClick: function onTimeRangeDoubleClick(args),
onTimeRangeSelected: function onTimeRangeSelected(args),
performance:true,
range:Object,
sortResourceBy:"name",
treeEnabled:true,
updateDebouncerWait:100,
useCache:true,
snapToGrid: false,
useEventBoxes: 'Never'
}

Could you guys figure out what could be blocking us?

Thanks

Comment posted by Dan Letecky [DayPilot]
7 years ago.

Mauricio,

Do you see any problem in the "snap to grid" online demo?
http://javascript.daypilot.org/demo/scheduler/snaptogrid.html

The only properties that affect it are useEventBoxes (for displaying) and snapToGrid (for drag and drop). You can also override the target event start/end in onEventMoving (https://doc.daypilot.org/scheduler/event-moving-customization/) but it doesn't seem to be your case.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.