update zoom and pan