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;
});[/code]