Limit drag to either axis.

The scheduler I’m building is using a units view to show some people’s tasks throughout any given day.

What I want to achieve is dragging events between persons (already possible), but the x-axis should be locked. I.e you can change responsible person, but not the time of day. As far as I could see, there’s no way to do this without digging into the code.

The only solution I see right now is to disable the built-in drag and drop support in the system, and implement it manually on the side.

What do you reckon?

Cheers,
Peter

You can’t disable visual part of dnd, but you can prevent actual date changing

in onBeforeDrag handler you can save start and end date of event
and in onBeforeEventChanged - set the dates back to original ones

as result even if user has changed start date of event during dnd, when dnd finished date will be reset to the original one ( in same time the y-scale value of event can be changed )