How to disable event dragging when resize chosen?

I have a requirement to disable events being dragged on the y axis, but allow for x axis resizing, if a property on the event is set. As can be seen from the code below, I am checking the onbefore event for the mode of drag, but when the mode is ‘resize’, then the entire event can be dragged on the y axis as well. Any ideas on how to get this to work?

[code]scheduler.attachEvent(“onBeforeDrag”, function (id, mode, e) {
//any custom logic here
var allowDrag = false;

// If the event is Fixed, ie can't move then don't move it
var dragged_event = scheduler.getEvent(id);
if (dragged_event.Fixed)
    if (mode == 'resize')
        allowDrag = true;
    else if (mode == 'move')
        allowDrag = false;
else {
    allowDrag = true;

return allowDrag;


by default the resizing can move event between a timeline sections, and there is no public config to disable it.
However, you can do small workaround (put this code somewhere in your js initialization of scheduler):

var old_timeline_section = scheduler._update_timeline_section;

scheduler._update_timeline_section = function(){
	if(scheduler.getState().drag_mode != 'resize'){
		return old_timeline_section.apply(this, arguments);

})();[/code] - you can redefine the method that checks timeline section during drag and drop and call the original method only if drag mode is not resizing, so the section of timeline event won’t be changed if user resizes it. Or do checking that is more appropriate for your app

Thanks, Aliaksandr.