As I said, I create two svg under the main svg file. One with the content I want to control, that has a viewBox defined, the other one contains 6 rects that have an javascript function to change the viewBox of the first one.

Once again the result is in  https://www.graph-ic.org/svg-experiments/rack/index.html

I have put all the code into a git repository in graph-ic Gitlab. The url of the project is: https://gitlab.graph-ic.org/manolopm/rack-svg