How can I cancel a operation?

Hi, Team

I drag the event after I release the mouse I need to detect the collision events, if I found collision events I’ll rollback the operation and all changes, but I didn’t know how to cancel a operation in currently codes.

Have anyone can help me on this? Thanks.

Best wishes,


I just used below method to implement my requirement:

scheduler.attachEvent(“onBeforeEventChanged”,function(start, end){
collisionEndDate = end;
collisionStartDate = start;

And call it in mouse_up function:
if (this._drag_mode && this._drag_id){
var ev=this.getEvent(this._drag_id);
if (!this._drag_event.start_date || ev.start_date.valueOf()!=this._drag_event.start_date.valueOf() || ev.end_date.valueOf()!=this._drag_event.end_date.valueOf()){
this.callEvent(“onBeforeEventChanged”,[this._drag_event.start_date, this._drag_event.end_date]);

Then make the collision detect and rollback my operation and changes:
if (getCollision(id)){
if (!this._loading && this.validId(id)){

But I didn’t thinks this was a high efficient way to implement this, so have any other idea on this?

Best wishes,


Check …

This is experimental extension which do the same - prevent dnd operation if they are introducing a collision.

Thanks very much, I just try it and it works well.