diff --git a/src/packages/excalidraw/CHANGELOG.md b/src/packages/excalidraw/CHANGELOG.md index f4d9276fd..c1b4efb2e 100644 --- a/src/packages/excalidraw/CHANGELOG.md +++ b/src/packages/excalidraw/CHANGELOG.md @@ -15,7 +15,7 @@ Please add the latest change on the top under the correct section. ## Excalidraw API -- Enable detecting position update of the component and recompute offsets when position is updated [#3428](https://github.com/excalidraw/excalidraw/pull/3428). You can enable this by setting [`detectPosition`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#detectPosition) to `true`. +- Detecting the position of the component and recompute offsets when the position is updated [#3428](https://github.com/excalidraw/excalidraw/pull/3428). You can enable this by setting [`detectPosition`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#detectPosition) to `true`. - Recompute offsets on `scroll` of the nearest scrollable container [#3408](https://github.com/excalidraw/excalidraw/pull/3408). This can be disabled by setting [`detectScroll`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#detectScroll) to `false`. - Add `onPaste` prop to handle custom clipboard behaviours [#3420](https://github.com/excalidraw/excalidraw/pull/3420). diff --git a/src/packages/excalidraw/README_NEXT.md b/src/packages/excalidraw/README_NEXT.md index c2b1c3226..cbef94144 100644 --- a/src/packages/excalidraw/README_NEXT.md +++ b/src/packages/excalidraw/README_NEXT.md @@ -365,8 +365,8 @@ To view the full example visit :point_down: | [`name`](#name) | string | | Name of the drawing | | [`UIOptions`](#UIOptions) |
{ canvasActions: CanvasActions }| [DEFAULT UI OPTIONS](https://github.com/excalidraw/excalidraw/blob/master/src/constants.ts#L129) | To customise UI options. Currently we support customising [`canvas actions`](#canvasActions) | | [`onPaste`](#onPaste) |
(data: ClipboardData, event: ClipboardEvent | null) => boolean| | Callback to be triggered if passed when the something is pasted in to the scene | -| [`detectScroll`](#detectScroll) | boolean | true | Indicates whether to update the offsets when nearest ancestor is scrolled. | -| [`detectPosition`](#detectPosition) | boolean | false | Indicates whether to update the offsets when position of the Excalidraw component is updated. | +| [`detectScroll`](#detectScroll) | boolean | true | Indicates whether to recompute the offsets when nearest ancestor is scrolled. | +| [`detectPosition`](#detectPosition) | boolean | false | Indicates whether to recompute the offsets when position of the Excalidraw component is updated. | ### Dimensions of Excalidraw @@ -442,7 +442,7 @@ You can pass a `ref` when you want to access some excalidraw APIs. We expose the | getAppState |
() => AppState| Returns current appState | | history | `{ clear: () => void }` | This is the history API. `history.clear()` will clear the history | | setScrollToContent |
(ExcalidrawElement[]) => void| Scroll to the nearest element to center | -| [`refresh`](#refresh) | `() => void` | Updates the offsets for the Excalidraw component. | +| [`refresh`](#refresh) | `() => void` | Recomputes the offsets for the Excalidraw component. | | [`importLibrary`](#importlibrary) | `(url: string, token?: string) => void` | Imports library from given URL. | | setToastMessage | `(message: string) => void` | This API can be used to show the toast with custom message. | @@ -569,7 +569,7 @@ No Excalidraw package doesn't come with collaboration, since this would have dif ### refresh -Updates the offsets for the Excalidraw component so that the coordinates are computed correctly (for example the cursor position). You don't have to call this when the position is changed due to scrolling on nearest scrollable parent or when the excalidraw container resizes (we handle that ourselves). For any other cases if the position of excalidraw is updated (example due to multiple scroll or add / removal of elements in flex container) you can use [detectPosition](#detectposition) or handle it manually by calling this API. +Recomputes the offsets for the Excalidraw component so that the coordinates are computed correctly (for example the cursor position). You don't have to call this when the position is changed due to scrolling on the nearest scrollable parent or when the excalidraw container resizes (we handle that ourselves). For any other cases if the position of excalidraw is updated (for example due to multiple scrolls or add / removal of elements in flex container) you can use [detectPosition](#detectposition) or handle it manually by calling this API. ### importLibrary