The zoom a window stack should run at: base, stepped down a whole number at a time until contentHeight (unzoomed) fits viewportHeight, and never below 1. A tall window on a short screen would otherwise be clipped at both ends.
base
contentHeight
viewportHeight
import { fitWindowZoom } from '@datamoc/mwg/two-d/ui';console.log(fitWindowZoom(3, 300, 700)); // 2 - 300 x 3 is too tall, 300 x 2 fits Copy
import { fitWindowZoom } from '@datamoc/mwg/two-d/ui';console.log(fitWindowZoom(3, 300, 700)); // 2 - 300 x 3 is too tall, 300 x 2 fits
The zoom a window stack should run at:
base, stepped down a whole number at a time untilcontentHeight(unzoomed) fitsviewportHeight, and never below 1. A tall window on a short screen would otherwise be clipped at both ends.