@modoki/engine / index / calibratePresentationScale
Function: calibratePresentationScale()
calibratePresentationScale(
zoomFactor):void
Editor-only: calibrate the display baseline from the AUTHORITATIVE page-zoom factor (webContents.getZoomFactor(), pushed by main). Recovers the true display scale baseDpr = devicePixelRatio / zoomFactor even when the editor restored a persisted zoom before mount. Idempotent — safe to call on mount and on every zoom change (also re-fixes a window moved to a differently-scaled monitor).
Parameters
zoomFactor
number
Returns
void