success/packages/excalidraw
Aakansha Doshi 47f87f4ecb
fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
* fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap

* lint

* fix

* use non deleted elements where possible

* use non deleted elements map in actions

* pass elementsMap instead of array to elementOverlapsWithFrame

* lint

* fix

* pass elementsMap to getElementsCorners

* pass elementsMap to getEligibleElementsForBinding

* pass elementsMap in bindOrUnbindSelectedElements and unbindLinearElements

* pass elementsMap in elementsAreInFrameBounds,elementOverlapsWithFrame,isCursorInFrame,getElementsInResizingFrame

* pass elementsMap in getElementsWithinSelection, getElementsCompletelyInFrame, isElementContainingFrame, getElementsInNewFrame

* pass elementsMap to getElementWithTransformHandleType

* pass elementsMap to getVisibleGaps, getMaximumGroups,getReferenceSnapPoints,snapDraggedElements

* lint

* pass elementsMap to bindTextToShapeAfterDuplication,bindLinearElementToElement,getTextBindableContainerAtPosition

* revert changes for bindTextToShapeAfterDuplication
..
actions fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
components fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
context
css feat: change collab trigger & add share dialog ()
data fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
element fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
hooks
locales feat: change collab trigger & add share dialog ()
renderer fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
scene fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
tests fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
.gitignore
.size-limit.json
CHANGELOG.md docs: release patch v0.17.3 ()
README.md
align.ts
analytics.ts
animated-trail.ts
animation-frame-handler.ts
appState.ts fix: remove t from getDefaultAppState and allow name to be nullable ()
charts.test.ts
charts.ts
clients.ts
clipboard.test.ts
clipboard.ts
colors.ts
constants.ts fix: remove t from getDefaultAppState and allow name to be nullable ()
css.d.ts
cursor.ts
distribute.ts
emitter.ts
env.cjs
errors.ts
frame.test.tsx
frame.ts fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
ga.ts
gadirections.ts
galines.ts
gapoints.ts
gatransforms.ts
gesture.ts
global.d.ts
groups.ts
history.ts
i18n.ts
index-node.ts
index.tsx feat: support onPointerUp prop ()
jotai.ts
keys.ts
laser-trails.ts
math.test.ts
math.ts
package.json
points.ts
polyfill.ts
pwacompat.d.ts
random.ts
react-app-env.d.ts
reactUtils.ts
shapes.tsx
snapping.ts fix: remove scene from getElementAbsoluteCoords and dependent functions and use elementsMap ()
tsconfig.json
types.ts fix: remove t from getDefaultAppState and allow name to be nullable ()
utility-types.ts
utils.ts feat: change collab trigger & add share dialog ()
vite-env.d.ts
zindex.ts

README.md

Excalidraw

Excalidraw is exported as a component to directly embed in your projects.

Installation

You can use npm

npm install react react-dom @excalidraw/excalidraw

or via yarn

yarn add react react-dom @excalidraw/excalidraw

After installation you will see a folder excalidraw-assets and excalidraw-assets-dev in dist directory which contains the assets needed for this app in prod and dev mode respectively.

Move the folder excalidraw-assets and excalidraw-assets-dev to the path where your assets are served.

By default it will try to load the files from https://unpkg.com/@excalidraw/excalidraw/dist/

If you want to load assets from a different path you can set a variable window.EXCALIDRAW_ASSET_PATH depending on environment (for example if you have different URL's for dev and prod) to the url from where you want to load the assets.

Note

If you don't want to wait for the next stable release and try out the unreleased changes you can use @excalidraw/excalidraw@next.

Dimensions of Excalidraw

Excalidraw takes 100% of width and height of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.

Demo

Try here.

Integration

Head over to the docs

API

Head over to the docs

Contributing

Head over to the docs