Adding the code above to line 822 of swivelButton.rb fixes the preview image:
Sketchup.active_model.active_view.zoom_extents
Then modify line 572 of swivelButton.rb from:
standoff_distance = getStandoffDistance() * 1.1;
to
standoff_distance = targetNow.distance eyeNow
Add the following line above line 583 so you end up with:
standoff_eyepoint = eyeNow;
centerpoint.z = standoff_eyepoint.z;
Comment out lines 656 to 663:
# bb=Sketchup.active_model.bounds
# pmax = bb.max
# pmin = bb.min
# zdiff = bb.max[2]-bb.min[2]
# pcenter = bb.center
# targetNow = pcenter
# up = Geom;;Vector3d.new(0.0,0.0,1.3*zdiff)
# upTarget = pcenter + up
The code before tried to fit the entire model into the view by getting the bounding box of the active model and drawing a circle around it, then panning the camera around that circle.
My fix, simply draws a circle around the model from the current cameras position and then pans around that circle.