Added drag_lock_min_distance to make sure axis locking occurs only when the distance has become large enough to reliably determine the direction