Extra Zoom Space When Zooming In

Emmett Husmann's icon

So I'm working on a standalone application, and I'm trying to make it so when you change the size of the window, the zoom changes to fit it. I've gotten it to work fairly well, but there's one issue.

When zooming in, Max adds extra blank space around the patcher even if there aren't any objects there. This is really annoying from a UI perspective since users may just scroll away from the main interface. The only solution I've found is constantly scrolling back to 0,0 which is really crude and looks a bit silly.

I was wondering if anyone knows a way to get rid of the empty space around the patcher, or just a better way of resizing windows in general.


PS, I don't think Scroll.js gets included with the patcher, so you can download the file or just copy paste this:

function scroll_window(x,y)  {
    this.patcher.wind.scrollto (x,y);
    }
resizer.maxpat
Max Patch

Scroll.js
text/javascript 0.07 KB