allow to supply canvas offsets from upstream (#2271)

This commit is contained in:
David Luzar 2020-10-23 19:06:16 +02:00 committed by GitHub
parent 499a60309f
commit 72a3450c99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 140 additions and 101 deletions

View file

@ -126,6 +126,10 @@ export type LibraryItems = readonly LibraryItem[];
export interface ExcalidrawProps {
width: number;
height: number;
/** if not supplied, calculated by Excalidraw */
offsetLeft?: number;
/** if not supplied, calculated by Excalidraw */
offsetTop?: number;
onChange?: (
elements: readonly ExcalidrawElement[],
appState: AppState,