Lock horizontal/vertical draggin according to sortDirection