And/or there could be command/hotkey for ‟previous view” which would allow to trace dragging and zooming backwards, useful also to restore accidental unindended moves.
For inspiration, it is used in 3D applications like:
- SolidWorks with icon
- SketchUp
Both have also the feature similar to original feature request, called ‟Zoom to Fit” or ‟Zoom Extents” respectively. That not only centers but also zooms to fit entire model/graph to the window.