Added calculation of touch events for each direction