Hey, thank you so much for sharing this code. It helped me so much on my projects. I had to change the last two lines of your code to get the movement to work smoothly when zooming though. For anyone else that wants to use this with a more smooth pan while they are pinching try these lines:
var drag_vector: Vector2 = event.relative / zoom.x
offset -= drag_vector / 2
Cheers, Dan