after drag, sort by horizontal or vertical position

Fixes #133