neo
neo copied to clipboard
draggable.DragZone: onAfterDragStart()
Flagging this issue as "good first issue" & "help wanted", since it is an easy one.
Move the logic inside the promise callback of dragStart() into a new method.
Neo.main.DomAccess.getBoundingClientRect({
id: me.getDragElementRoot().id
}).then(rect => {
offsetX = data.clientX - rect.left;
offsetY = data.clientY - rect.top;
Object.assign(me, {
dragElementRect: rect,
offsetX : offsetX,
offsetY : offsetY
});
me.createDragProxy(rect);
me.fire('dragStart', {
dragElementRect: rect,
id : me.id,
offsetX : offsetX,
offsetY : offsetY
});
});
draggable.calendar.WeekEventDragZone can then use it to fire the dragStart event.