Improved dragging algorithm in Q/sortable tool