I was following this tutorial for swaping events
https://demos.daypilot.org/javascript-scheduler-swap-events/
Problem for me is that line of code
targetEvent.data.end = sourceEvent.data.end because event does not keep origin duration but will get one based on event which was swapped on his location.