Add pan gesture and update animations