Adapt to window sizes.

Now to performance tuning -- apparently this method of grouping subbrackets
causes a whole bunch of extra canvas elements?