David Luzar
163ad1f4c4
feat: image support (#4011)
Co-authored-by: Emil Atanasov <heitara@gmail.com >
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com >
преди 3 години
David Laban
f1cf28a84e
refactor: reduce passing-around of canvas in export code (#3571)
преди 4 години
Fabien BERNARD
d91950bd03
feat: Add onPaste prop to customise clipboard paste event (#3420)
* Add Awaited type util
* Expose onPasteFromClipboard props
* Add `event` as second param for advanced usages
* Add support for async flows
* Extract ClipboardData type
* Rename `onPasteFromClipboard` to `onPaste`
* Remove unused type helper
* Add `onPaste` documentation
* tweak docs
* fix
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com >
преди 4 години
David Luzar
94ad8eaa19
feat: support pasting file contents & always prefer system clip (#3257)
преди 4 години
Lipis
b2d442abce
Support CSV graphs and improve the look and feel (#2495)
Co-authored-by: David Luzar <luzar.david@gmail.com >
Co-authored-by: dwelle <luzar.david@gmail.com >
преди 4 години
Lipis
5d295415db
Keep errors, elements and comments consistent (#2340)
Co-authored-by: David Luzar <luzar.david@gmail.com >
преди 4 години
Giacomo Debidda
fc58e51ab3
Show error message when canvas to export is too big (#1256) (#2210)
Co-authored-by: dwelle <luzar.david@gmail.com >
преди 4 години
David Luzar
1484c5a63b
fileHandle refactor & fixes (#2252)
преди 4 години
David Luzar
47dba05c91
System clipboard (#2117)
преди 4 години
Pete Hunt
f7c4efbd35
Excalicharts MVP (#1723)
Co-authored-by: David Luzar <luzar.david@gmail.com >
преди 4 години
Lipis
c427aa3cce
Prefer arrow functions and callbacks (#1210)
преди 5 години
Pete Hunt
df0613d8ac
Add NonDeleted<ExcalidrawElement> (#1068)
* add NonDeleted
* make test:all script run tests without prompt
* rename helper
* replace with helper
* make element contructors return nonDeleted elements
* cache filtered elements where appliacable for better perf
* rename manager element getter
* remove unnecessary assertion
* fix test
* make element types in resizeElement into nonDeleted
Co-authored-by: dwelle <luzar.david@gmail.com >
преди 5 години
David Luzar
729aeacc47
prevent pasting svg copied from excalidraw (#1288)
* prevent pasting svg copied from excalidraw
* remove unnecessary template
преди 5 години
Roxana Chiorean
d5366db341
Adding ability to copy to clipboard as SVG (#1250)
преди 5 години
dependabot-preview[bot]
722c498abe
Bump prettier from 1.19.1 to 2.0.1 (#1060)
* Bump prettier from 1.19.1 to 2.0.1
Bumps [prettier](https://github.com/prettier/prettier ) from 1.19.1 to 2.0.1.
- [Release notes](https://github.com/prettier/prettier/releases )
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md )
- [Commits](https://github.com/prettier/prettier/compare/1.19.1...2.0.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* Update formatting
Co-authored-by: dependabot-preview[bot] <27856297 +dependabot-preview[bot]@users.noreply.github.com >
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com >
преди 5 години
Pete Hunt
ccbbdb75a6
Refactor ExcalidrawElement (#874)
* Get rid of isSelected, canvas, canvasZoom, canvasOffsetX and canvasOffsetY on ExcalidrawElement.
* Fix most unit tests. Fix cmd a. Fix alt drag
* Focus on paste
* shift select should include previously selected items
* Fix last test
* Move this.shape out of ExcalidrawElement and into a WeakMap
преди 5 години
Jed Fox
c6a0cfc2b1
Refactor (#862)
* Initial factoring out of parts of the LayerUI component
2360 → 2224 LOC
* Create a Section component
* Break up src/index.tsx
* Refactor actions to reduce duplication, fix CSS
Also consolidate icons
* Move scene/data.ts to its own directory
* Fix accidental reverts, banish further single-character variables
* ACTIVE_ELEM_COLOR → ACTIVE_ELEMENT_COLOR
* Further refactoring the icons file
* Log all errors
* Pointer Event polyfill to make the tests work
* add test hooks & fix tests
Co-authored-by: dwelle <luzar.david@gmail.com >
преди 5 години
Lipis
097c5dfad7
Refactor: e -> event or error, err -> error, p -> pointer (#831)
* Refactor: e -> event or error, err -> error, p -> pointer
* simplify
преди 5 години
Christopher Chedeau
5256096d76
Fast & Furious (#655)
* [WIP] Fast & Furious
* ensure we translate before scaling
* implement canvas caching for rest of elements
* remove unnecessary ts-ignore
* fix for devicePixelRatio
* initialize missing element props on restore
* factor out canvas padding
* remove unnecessary filtering
* simplify renderElement
* regenerate canvas on prop changes
* revert swapping shape resetting with canvas
* fix blurry rendering
* apply devicePixelRatio when clearing canvas
* improve blurriness; fix arrow canvas offset
* revert canvas clearing changes in anticipation of merge
* normalize scrollX/Y on update
* fix getDerivedStateFromProps
* swap derivedState for type brands
* tweak types
* remove renderScene offsets
* move selection element translations to renderElement
* dry out canvas zoom transformations
* fix padding offset
* Render cached canvas based on the zoom level
Co-authored-by: David Luzar <luzar.david@gmail.com >
Co-authored-by: Preet <833927+pshihn@users.noreply.github.com >
преди 5 години
Enzo Ferey
6ebd41734f
Resize handler detection should not be active when moving multip… (#767)
* Fix bug.
* Implement `getSelectedElements`.
* Explicit condition.
* Respect variable naming.
* Keep state consistent.
* Use `isSomeElementSelected` abstraction.
* Missing ones.
преди 5 години
David Luzar
88eacc9da7
Improve pasting (#723)
* switch to selection tool on paste
* align pasting via contextMenu with pasting from event
* ensure only plaintext can be pasted
* fix findShapeByKey regression
* simplify wysiwyg pasting
* improve wysiwyg blurriness
преди 5 години
David Luzar
b7a6ceba68
Eslint tweaks (#696)
* make eslint styleguide into warnings & drop no-else-return
* reintroduce max-warnings=0
* remove unnecessary eslint line disable
* reintroduce no-else-return rule
преди 5 години
David Luzar
954d805cb3
rewrite clipboard handling (#689)
преди 5 години