Added support for rotate and panning