Hi,
I want to constrain events drag and drop to an axis, in scheduler. To do so, the function checking whether elements are editable returns false (I have an option to use free drag and drop instead too) and I handle drag and drop by ths code in timeline view (tree mode):
// Custom HTML rendering of events so 'div.draggable-event' is the custom code top element
$$('div.draggable-event').forEach(function (elt) {
// Event id in a custom attribute
var eventId = $(elt).readAttribute('data-event_id');
// DHTMLX generated div is the element to drag
var draggedElt = jQuery(elt).parent().get(0);
jQuery(draggedElt).draggable({
axis: 'y',
containment: '#scheduler_data',
start: function() {
draggedElt.addClassName('dhx_in_move');
},
stop: function (event, ui) {
draggedElt.removeClassName('dhx_in_move');
console.log('event dropped, TODO need to handle it now');
}
});
}.bind(this));
I have issue with dragged event hiding below the next upper/down line (div.dhx_matrix_line I think).
I’ve seen a lot of DOM elements with hidden overflow. The top-level event DOM element generated by DHTMLX has absolute positioning.
I use Scheduler 4.3.1.
Thanks for clues,
B. Post