Preserve panning when switching images; fixes issue #131