feat: add possibility to limit scroll area

This commit is contained in:
Arnošt Pleskot
2023-06-30 01:27:53 +02:00
parent 2e46e27490
commit 75f8e904cc
3 changed files with 99 additions and 2 deletions
+7
View File
@@ -223,6 +223,12 @@ export type AppState = {
pendingImageElementId: ExcalidrawImageElement["id"] | null;
showHyperlinkPopup: false | "info" | "editor";
selectedLinearElement: LinearElementEditor | null;
scrollConstraints: {
x: number;
y: number;
width: number;
height: number;
} | null;
};
export type UIAppState = Omit<
@@ -549,6 +555,7 @@ export type ExcalidrawImperativeAPI = {
* used in conjunction with view mode (props.viewModeEnabled).
*/
updateFrameRendering: InstanceType<typeof App>["updateFrameRendering"];
setScrollConstraints: InstanceType<typeof App>["setScrollConstraints"];
};
export type Device = Readonly<{