1681-engine / index / fitScale
Function: fitScale() ​
ts
function fitScale(
contentW,
contentH,
boxW,
boxH
): number;Defined in: src/core/pixelZoom.ts:92
The whole-number scale content of this size is drawn at to fit a box (a map panel, a preview): the largest integer that fits both ways, never below 1, so every source pixel is the same number of screen pixels.
Parameters ​
| Parameter | Type |
|---|---|
contentW | number |
contentH | number |
boxW | number |
boxH | number |
Returns ​
number