* resize single elements from the side * fix lint * do not resize texts from the sides (for we want to wrap/unwrap) * omit side handles for frames too * upgrade types * enable resizing from the sides for multiple elements as well * fix lint * maintain aspect ratio when elements are not of the same angle * lint * always resize proportionally for multiple elements * increase side resizing padding * code cleanup * adaptive handles * do not resize for linear elements with only two points * prioritize point dragging over edge resizing * lint * allow free resizing for multiple elements at degree 0 * always resize from the sides * reduce hit threshold * make small multiple elements movable * lint * show side handles on touch screen and mobile devices * differentiate touchscreens * keep proportional with text in multi-element resizing * update snapshot * update multi elements resizing logic * lint * reduce side resizing padding * bound texts do not scale in normal cases * lint * test sides for texts * wrap text * do not update text size when changing its alignment * keep text wrapped/unwrapped when editing * change wrapped size to auto size from context menu * fix test * lint * increase min width for wrapped texts * wrap wrapped text in container * unwrap when binding text to container * rename `wrapped` to `autoResize` * fix lint * revert: use `center` align when wrapping text in container * update snaps * fix lint * simplify logic on autoResize * lint and test * snapshots * remove unnecessary code * snapshots * fix: defaults not set correctly * tests for wrapping texts when resized * tests for text wrapping when edited * fix autoResize refactor * include autoResize flag check * refactor * feat: rename action label & change contextmenu position * fix: update version on `autoResize` action * fix infinite loop when editing text in a container * simplify * always maintain `width` if `!autoResize` * maintain `x` if `!autoResize` * maintain `y` pos after fontSize change if `!autoResize` * refactor * when editing, do not wrap text in textWysiwyg * simplify text editor * make test more readable * comment * rename action to match file name * revert function signature change * only update in app --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com> |
10 months ago | |
---|---|---|
.. | ||
actions | 10 months ago | |
components | 10 months ago | |
context | 10 months ago | |
css | 10 months ago | |
data | 10 months ago | |
element | 10 months ago | |
hooks | 10 months ago | |
locales | 10 months ago | |
renderer | 10 months ago | |
scene | 10 months ago | |
tests | 10 months ago | |
.gitignore | 1 year ago | |
.size-limit.json | 1 year ago | |
CHANGELOG.md | 10 months ago | |
README.md | 1 year ago | |
align.ts | 10 months ago | |
analytics.ts | 11 months ago | |
animated-trail.ts | 10 months ago | |
animation-frame-handler.ts | 1 year ago | |
appState.ts | 10 months ago | |
change.ts | 10 months ago | |
charts.test.ts | 10 months ago | |
charts.ts | 10 months ago | |
clients.ts | 10 months ago | |
clipboard.test.ts | 1 year ago | |
clipboard.ts | 10 months ago | |
colors.ts | 10 months ago | |
constants.ts | 10 months ago | |
css.d.ts | 1 year ago | |
cursor.ts | 10 months ago | |
deburr.ts | 11 months ago | |
distribute.ts | 1 year ago | |
emitter.ts | 10 months ago | |
env.cjs | 1 year ago | |
errors.ts | 11 months ago | |
fractionalIndex.ts | 10 months ago | |
frame.test.tsx | 10 months ago | |
frame.ts | 10 months ago | |
ga.ts | 1 year ago | |
gadirections.ts | 10 months ago | |
galines.ts | 10 months ago | |
gapoints.ts | 10 months ago | |
gatransforms.ts | 10 months ago | |
gesture.ts | 10 months ago | |
global.d.ts | 10 months ago | |
groups.ts | 10 months ago | |
history.ts | 10 months ago | |
i18n.ts | 10 months ago | |
index-node.ts | 1 year ago | |
index.tsx | 10 months ago | |
jotai.ts | 10 months ago | |
keys.ts | 11 months ago | |
laser-trails.ts | 10 months ago | |
math.test.ts | 1 year ago | |
math.ts | 10 months ago | |
package.json | 11 months ago | |
points.ts | 10 months ago | |
polyfill.ts | 1 year ago | |
pwacompat.d.ts | 1 year ago | |
queue.test.ts | 12 months ago | |
queue.ts | 10 months ago | |
random.ts | 1 year ago | |
react-app-env.d.ts | 1 year ago | |
reactUtils.ts | 1 year ago | |
shapes.tsx | 1 year ago | |
snapping.ts | 10 months ago | |
store.ts | 10 months ago | |
tsconfig.json | 1 year ago | |
types.ts | 10 months ago | |
utility-types.ts | 12 months ago | |
utils.ts | 10 months ago | |
vite-env.d.ts | 1 year ago | |
zindex.ts | 10 months ago |
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
Integration
Head over to the docs
API
Head over to the docs
Contributing
Head over to the docs