Implemented snapping for drag and drop