Panning is the same, except you would clamp the X & Y, not Z. You would also use the pan value rather than the zoom value.