Lipis
8d4f455cd3
chore: Update Typescript to 4.4.4 ( #4188 )
2021-11-02 14:24:16 +02:00
David Luzar
163ad1f4c4
feat: image support ( #4011 )
...
Co-authored-by: Emil Atanasov <heitara@gmail.com>
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2021-10-21 22:05:48 +02:00
David Laban
f1cf28a84e
refactor: reduce passing-around of canvas in export code ( #3571 )
2021-05-13 19:21:15 +02:00
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>
2021-04-09 20:19:58 +05:30
David Luzar
94ad8eaa19
feat: support pasting file contents & always prefer system clip ( #3257 )
2021-03-20 20:20:47 +01:00
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>
2020-12-11 12:13:23 +01:00
Lipis
5d295415db
Keep errors, elements and comments consistent ( #2340 )
...
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-11-05 18:06:18 +01:00
Giacomo Debidda
fc58e51ab3
Show error message when canvas to export is too big ( #1256 ) ( #2210 )
...
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-28 20:52:53 +01:00
David Luzar
1484c5a63b
fileHandle refactor & fixes ( #2252 )
2020-10-19 10:53:37 +02:00
David Luzar
47dba05c91
System clipboard ( #2117 )
2020-09-04 14:58:32 +02:00
Pete Hunt
f7c4efbd35
Excalicharts MVP ( #1723 )
...
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-06-06 22:09:04 +02:00
Lipis
c427aa3cce
Prefer arrow functions and callbacks ( #1210 )
2020-05-20 15:21:37 +02:00
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>
2020-04-08 18:49:52 +02:00
David Luzar
729aeacc47
prevent pasting svg copied from excalidraw ( #1288 )
...
* prevent pasting svg copied from excalidraw
* remove unnecessary template
2020-04-06 23:02:17 +02:00
Roxana Chiorean
d5366db341
Adding ability to copy to clipboard as SVG ( #1250 )
2020-04-06 02:13:17 +03:00
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>
2020-03-23 13:05:07 +02:00
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
2020-03-08 10:20:55 -07:00
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>
2020-03-07 16:20:38 +01:00
Lipis
097c5dfad7
Refactor: e -> event or error, err -> error, p -> pointer ( #831 )
...
* Refactor: e -> event or error, err -> error, p -> pointer
* simplify
2020-02-28 23:03:53 +01:00
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>
2020-02-19 17:25:01 +01:00
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.
2020-02-16 22:54:50 +01:00
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
2020-02-07 18:42:24 +01:00
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
2020-02-05 17:41:14 +01:00
David Luzar
954d805cb3
rewrite clipboard handling ( #689 )
2020-02-04 11:50:18 +01:00