mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: support custom elements in @excalidraw/excalidraw (#5164)
* feat: support custom elements in @excalidraw/excalidraw * revert * fix css * fix offsets * fix overflow of custom elements in example * fix overflow in comments input * make sure comment input never overflows the viewport * remove offsetschange * expose setActiveTool * rename to onPointerDown * update docs * fix
This commit is contained in:
parent
a078508c05
commit
68f23d652f
7 changed files with 338 additions and 18 deletions
|
@ -289,6 +289,11 @@ export interface ExcalidrawProps {
|
|||
nativeEvent: MouseEvent | React.PointerEvent<HTMLCanvasElement>;
|
||||
}>,
|
||||
) => void;
|
||||
onPointerDown?: (
|
||||
activeTool: AppState["activeTool"],
|
||||
pointerDownState: PointerDownState,
|
||||
) => void;
|
||||
onScrollChange?: (scrollX: number, scrollY: number) => void;
|
||||
}
|
||||
|
||||
export type SceneData = {
|
||||
|
@ -449,6 +454,7 @@ export type ExcalidrawImperativeAPI = {
|
|||
readyPromise: ResolvablePromise<ExcalidrawImperativeAPI>;
|
||||
ready: true;
|
||||
id: string;
|
||||
setActiveTool: InstanceType<typeof App>["setActiveTool"];
|
||||
};
|
||||
|
||||
export type DeviceType = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue