Fixed pan in 2D

Fixed #28