Alter camera interactions to fix orbiting behaviour on rotate.

Move the calculations for panning to a funcion to save computation.

Change-Id: I26934c7b2b1274ee3801758e45eeb67fb03fe107
Merge topic 'vtkweb-fix-webgl-viewport' into master

c3c23c62 Alter camera interactions to fix orbiting behaviour on rotate.