I think it needs to rotate only top and bottom projection accordingly to 3d view.
SetNearestOrthoView2.js do it like expected. It switches this view:

to that:
But after it once switch the top view, it starts wrong switching the side view. From this:

to that:

|