What would be the recommended approach to allowing drag and drop support for only certain events on a calendar?
For example, currently you can use dhtmlXScheduler.config.drag_create,dhtmlXScheduler.config.drag_move, and dhtmlXScheduler.config.drag_resize to control drag and drop in a global way.
The onBeforeDrag event doesn’t appear to exist in the latest sources I can find, such as from: dhtmlx.com/docs/products/kb/inde … 69&a=19733
For example this seems to be the current logic in scheduler._on_mouse_down:
if (this.drag_mode){
if (!this.config["drag"+this._drag_mode])
this._drag_mode=this._drag_id=0;
else {
this._drag_id=this._locate_event(src);
this._drag_event=this._copy_event(this.getEvent(this._drag_id)||{});
}
}
vs the following in the examples provided:
if (this._drag_mode){
var id = this.locate_event(src);
if (!this.config["drag"+this._drag_mode] || !this.callEvent(“onBeforeDrag”,[id, this._drag_mode, e]))
this._drag_mode=this._drag_id=0;
else {
this._drag_id= id;
this._drag_event=this._copy_event(this.getEvent(this._drag_id)||{});
}
}
While existing version ( 2.0 ) doesn’t support such functionality - it will be added in 2.1.
The link, provided above, dhtmlx.com/docs/products/kb/ … kb&q=11090 has the updated version of scheduler attached ( check the last post in the thread ) which is existing version of scheduler with necessary event added.