Add onElementClick and export sceneCoordsToViewportCoords

This commit is contained in:
ad1992
2022-03-24 17:24:54 +05:30
parent 47498796e0
commit 5f4a5b1789
4 changed files with 71 additions and 9 deletions

View File

@@ -263,6 +263,10 @@ export interface ExcalidrawProps {
) => void;
renderCustomElementWidget?: (appState: AppState) => void;
customElementsConfig?: CustomElementConfig[];
onElementClick: (
element: NonDeleted<ExcalidrawElement>,
event: React.PointerEvent<HTMLCanvasElement>,
) => void;
}
export type SceneData = {