Based on https://javascript.info/mouse-drag-and-drop