Disabled the swiping through the gallery when button is pressed for slider or panning is done