added pan to mainview