Added drag direction evaluation to trigger open and close operations on release