diff --git a/src/packages/excalidraw/CHANGELOG.MD b/src/packages/excalidraw/CHANGELOG.MD index c9caeefed..92633cce3 100644 --- a/src/packages/excalidraw/CHANGELOG.MD +++ b/src/packages/excalidraw/CHANGELOG.MD @@ -26,6 +26,7 @@ Please add the latest change on the top under the correct section. ### Fixes +- Hide collab button when onCollabButtonClick not supplied [#2598](https://github.com/excalidraw/excalidraw/pull/2598) - Fix resizing the pasted charts [#2586](https://github.com/excalidraw/excalidraw/pull/2586) - Fix element visibility and zoom on cursor when canvas offset isn't 0. [#2534](https://github.com/excalidraw/excalidraw/pull/2534) - Fix Library Menu Layout [#2502](https://github.com/excalidraw/excalidraw/pull/2502) diff --git a/src/packages/excalidraw/README.md b/src/packages/excalidraw/README.md index 43f8214d5..a439b9a7e 100644 --- a/src/packages/excalidraw/README.md +++ b/src/packages/excalidraw/README.md @@ -219,8 +219,8 @@ This is the user name which shows during collaboration. Defaults to `{name: ''}` #### `excalidrawRef` -You can pass a ref when you want to access some excalidraw API's. -We expose the below API's +You can pass a `ref` when you want to access some excalidraw APIs. +We expose the below APIs: | API | signature | Usage | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | @@ -241,15 +241,15 @@ const excalidrawRef = { current: { readyPromise: { const { @@ -20,7 +19,7 @@ const Excalidraw = (props: ExcalidrawProps) => { initialData, user, excalidrawRef, - onCollabButtonClick = noop, + onCollabButtonClick, isCollaborating, onPointerUpdate, } = props; diff --git a/src/utils.ts b/src/utils.ts index a31a0c4a5..821ece570 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -310,8 +310,6 @@ export const isTransparent = (color: string) => { ); }; -export const noop = () => ({}); - export type ResolvablePromise = Promise & { resolve: [T] extends [undefined] ? (value?: T) => void : (value: T) => void; reject: (error: Error) => void;