From 110afc3c8520083f731149112d7e3e21f89dea66 Mon Sep 17 00:00:00 2001 From: dwelle <5153846+dwelle@users.noreply.github.com> Date: Thu, 21 Aug 2025 23:17:41 +0200 Subject: [PATCH] doc --- packages/excalidraw/types.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/excalidraw/types.ts b/packages/excalidraw/types.ts index 2eb5f0c71..050012272 100644 --- a/packages/excalidraw/types.ts +++ b/packages/excalidraw/types.ts @@ -936,8 +936,21 @@ export type ScrollConstraints = { width: number; height: number; animateOnNextUpdate?: boolean; + /** + * a facotr <0-1> that determines how much you can zoom out beyond the scroll + * constraints. + */ viewportZoomFactor?: number; + /** + * If true, the user will not be able to zoom out beyond the scroll + * constraints (taking into account the viewportZoomFactor). + */ lockZoom?: boolean; + /** + * <0-1> - how much can you scroll beyond the constrained area within the + * timeout window. Note you will still be snapped back to the constrained area + * after the timeout. + */ overscrollAllowance?: number; }; export type PendingExcalidrawElements = ExcalidrawElement[];