Handling and animating layer actions