Added option for disabling hiding on pan