mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: support selecting multiple library items via shift
(#4306)
This commit is contained in:
parent
b53d1f6f3e
commit
06db702b5d
15 changed files with 117 additions and 67 deletions
|
@ -15,6 +15,10 @@ Please add the latest change on the top under the correct section.
|
|||
|
||||
### Features
|
||||
|
||||
- #### BREAKING CHANGE
|
||||
|
||||
Removed `getElementMap` util method.
|
||||
|
||||
- Changes to [`exportToCanvas`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exportToCanvas) util function:
|
||||
|
||||
- Add `maxWidthOrHeight?: number` attribute.
|
||||
|
|
|
@ -865,22 +865,6 @@ import { isInvisiblySmallElement } from "@excalidraw/excalidraw-next";
|
|||
|
||||
Returns `true` if element is invisibly small (e.g. width & height are zero).
|
||||
|
||||
#### `getElementMap`
|
||||
|
||||
**_Signature_**
|
||||
|
||||
<pre>
|
||||
getElementsMap(elements: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L78">ExcalidrawElement[]</a>): {[id: string]: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/element/types.ts#L78">ExcalidrawElement</a>}
|
||||
</pre>
|
||||
|
||||
**How to use**
|
||||
|
||||
```js
|
||||
import { getElementsMap } from "@excalidraw/excalidraw-next";
|
||||
```
|
||||
|
||||
This function returns an object where each element is mapped to its id.
|
||||
|
||||
#### `loadLibraryFromBlob`
|
||||
|
||||
```js
|
||||
|
|
|
@ -171,7 +171,6 @@ const forwardedRefComp = forwardRef<
|
|||
export default React.memo(forwardedRefComp, areEqual);
|
||||
export {
|
||||
getSceneVersion,
|
||||
getElementMap,
|
||||
isInvisiblySmallElement,
|
||||
getNonDeletedElements,
|
||||
} from "../../element";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue