fa359034c5
scroll the closest element to center ( #1670 )
...
Co-authored-by: Sanghyeon Lee <yongdamsh@gmail.com >
2020-05-30 14:02:32 +02:00
David Luzar and GitHub
44a88d2d58
Rewrite restore to guard against missing migrations ( #1664 )
2020-05-28 02:41:34 -07:00
Pete Hunt and GitHub
56f8bc092d
Tests for groups, more test utils ( #1669 )
2020-05-28 10:56:18 +02:00
David Luzar and GitHub
4f3bf79708
skip element mutation on noop updates ( #1667 )
2020-05-28 00:50:56 -07:00
7edcea9a93
feat: resize text element ( #1650 )
...
* feat: resize text element
* ignore small font size change that leads jankiness
Co-authored-by: dwelle <luzar.david@gmail.com >
2020-05-28 07:17:15 +09:00
David Luzar and GitHub
63c10743fb
split font into fontSize and fontFamily ( #1635 )
2020-05-27 15:14:50 +02:00
61e5b66dac
Group/ungroup ( #1648 )
...
Co-authored-by: dwelle <luzar.david@gmail.com >
2020-05-26 13:07:46 -07:00
35049e3de7
History tweaks ( #1641 )
...
Co-authored-by: Pete Hunt <phunt@twitter.com >
2020-05-24 15:17:14 -07:00
d315e3dc4d
Update TypeScript to 3.9.3 ( #1640 )
...
Co-authored-by: tk338g <tkhazamov@wayfair.com >
2020-05-24 21:17:25 +02:00
6512ede9ca
Optimize undo history ( #1632 )
...
Co-authored-by: dwelle <luzar.david@gmail.com >
2020-05-23 12:07:11 -07:00
Daishi Kato and GitHub
51608c07b0
15-degree rotation locking ( #1627 )
2020-05-23 10:45:05 +02:00
Preet and GitHub
584e4182a7
Ensure arrows are not draggable from inside ( #1620 )
2020-05-21 21:57:54 +02:00
Lipis and GitHub
c427aa3cce
Prefer arrow functions and callbacks ( #1210 )
2020-05-20 15:21:37 +02:00
Daishi Kato and GitHub
4d2e8f9ad1
feat: resize multiple elements including two-point lines ( #1607 )
2020-05-18 10:36:30 +02:00
Daishi Kato and GitHub
6b628bb1a6
fix: resize non solid lines/arrows/draws ( #1608 )
2020-05-17 16:01:35 +02:00
David Luzar and GitHub
39c56a4c01
implement stroke style ( #1571 )
2020-05-14 17:04:33 +02:00
Daishi Kato and GitHub
f6be200388
feat: resize multiple curved lines ( #1596 )
2020-05-14 16:56:14 +02:00
Kostas Bariotis and GitHub
9ec43d2626
Add free draw mode ( #1570 )
2020-05-12 21:10:11 +02:00
Daishi Kato and GitHub
394237728f
Refactor: resize two-point lines/arrows ( #1568 )
2020-05-10 17:41:36 +02:00
Daishi Kato and GitHub
3b1d6910aa
fix resizing: dynamic pointer offset for better UX ( #1560 )
2020-05-09 10:57:00 +02:00
Daishi Kato and GitHub
73d8c5b7c1
fix resizing lines with abs coords bigger than element w/h ( #1427 )
2020-05-04 17:25:40 +02:00
Daishi Kato and GitHub
da1031aeb4
Fix resize logic (partly) ( #1475 )
2020-04-27 10:30:19 +02:00
ed6fb60337
resize elements from center point ( #1225 )
...
* add hint & support multi-line hints
* resize from center point using the new resize maths
* resize with origin element when lifting alt key
* add readonly to elementOriginPosition
* add setResizeWithCenterKeyLifted
* isResizeFromCenter logic
* offsetX and offsetY
* simplify equations
* creating element from center point
* lint
* lint
* lint
* remove revert on key up logic
Co-authored-by: dwelle <luzar.david@gmail.com >
Co-authored-by: daishi <daishi@axlight.com >
2020-04-22 17:57:17 +02:00
Daishi Kato and GitHub
8c49770e3b
Better resize cursors on rotated elements ( #1470 )
...
* better resize cursor on rotated elements
* refactor with Math.round
2020-04-22 15:11:01 +02:00
Preet and GitHub
9ac79061fa
Bump roughjs and resolve breaking change in roughjs refactoring… ( #1463 )
...
* Fix for roughjs refactoring curve-estinmation code into a separate package
* Update jest transformIgnorePatterns
2020-04-20 19:43:06 +02:00
7df16c1b1d
Bump prettier from 2.0.3 to 2.0.4 ( #1412 )
...
* Bump prettier from 2.0.3 to 2.0.4
Bumps [prettier](https://github.com/prettier/prettier ) from 2.0.3 to 2.0.4.
- [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/2.0.3...2.0.4 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* format
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com >
2020-04-14 12:30:58 +03:00
Daishi Kato and GitHub
e77e2255bd
Add test for getElementBounds ( #1395 )
...
* fix calc diamond bounds
* Add test for getElementBounds
* use toEqual
2020-04-13 17:47:09 -07:00
David Luzar and GitHub
692ceece65
fix not using className when querying container ( #1420 )
2020-04-13 17:29:11 +02:00
David Luzar and GitHub
6771b505ad
rewrite wysiwyg property updating ( #1387 )
...
* rewrite wysiwyg property updating
* reuse existing class
* fix case of focus being stolen by other UIs
* revert mistake csp removal
* ensure we don't run cleanup twice
* fix opacity updating
* add shape actions menu class to constants
2020-04-12 15:57:57 +02:00
Daishi Kato and GitHub
038cff8793
fix calc diamond bounds ( #1394 )
2020-04-11 18:19:01 -07:00
5e2f164026
PoC: Expose wysiwyg element to manipulate from outside ( #1356 )
...
* expose wysiwyg element to manipulate from outside
* keep focus after changing style
* update editingElement correctly
* remove mistake
* update text only
* proper check for element
* udpate snapshots
* add error log
* remove try catch handler
* remove blur event
* add proper types
* merge if condition
* simplify if condition
Co-Authored-By: Lipis <lipiridis@gmail.com >
Co-authored-by: dwelle <luzar.david@gmail.com >
Co-authored-by: Lipis <lipiridis@gmail.com >
Co-authored-by: Fausto95 <faustino.kialungila@gmail.com >
2020-04-11 18:10:56 +02:00
Daishi Kato and GitHub
5ca763cdbb
Calculate rotated element bounds properly ( #1354 )
...
* Calculate rotated element bounds properly, fixes #1303
* prefer isLinearElement
* empty commit
2020-04-11 13:10:47 +02:00
Sanghyeon Lee and GitHub
9761d7ea50
Refactor ResizeArrowFnType to resolve Codesandbox parsing error ( #1338 )
2020-04-09 19:10:35 +03:00
8efe0b7d05
Shift loses pointer fixing #1296 ( #1330 )
...
* change resize math to absolute instead of delta
* typings
* small change for width on rotation
* apply absolute resize to other sides
* revert&change math.ts
* polish, polish, polish
* refactor with offset
* eliminate nextX
* rename to offsetPointer
* fix curved lines
* prefer arrow function
* remove unused variables/comments for now
Co-authored-by: daishi <daishi@axlight.com >
2020-04-10 00:14:32 +09:00
fujimoto kyosuke and GitHub
b1ed5b4cdc
Support negative resize for multiple points line/arrow ( #1237 )
...
* Support negative resize for multiple points line
* prettier
* Fix an issue with width or height becoming zero
2020-04-09 11:53:12 +02:00
Preet and GitHub
57bbc9fe55
Fill a looped curve with the selected background color ( #1315 )
2020-04-09 11:46:47 +03:00
ff82d1cfa3
feat/ability to change the alignment of the text ( #1213 )
...
* feat: add the ability to change the alignement of the text
* test: update the snapshots to included the newely textAlign state
* style: use explicit key assignment to object
* test: add missing new key textAlign to newElement.test.ts
* style: make the text on the buttons start with uppercase
* Update src/locales/en.json
* add types
* add migration
* remove incorrect update
Co-authored-by: Youness Fkhach <younessfkhach@porotonmail.com >
Co-authored-by: Lipis <lipiridis@gmail.com >
Co-authored-by: dwelle <luzar.david@gmail.com >
2020-04-08 22:00:27 +02:00
David Luzar and GitHub
3fd6f3023f
support newline on shift+enter ( #1324 )
2020-04-08 20:56:27 +02:00
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
c3b83fba38
fix detecting rotated elements with selection ( #1273 )
...
* fix #1232
* Update src/element/bounds.ts
* prefer arrow functions
* fix merging
Co-authored-by: Lipis <lipiridis@gmail.com >
2020-04-07 16:04:20 +02:00
Daishi Kato and GitHub
2cc1105ff5
Resize multiple elements (rectangles, diamonds and ellipses onl… ( #1193 )
...
* experiment resizing multiple elements
* hack common component
* calculate scale properly (still se only)fg
* prioritize multi selection
* take handle offset into calculation
* fix master merge
* refactor resizeElements out from App
* wip: handlerRectanglesFromCoords
* fix test with type assertion
* properly show handles wip
* revert previous one and do a tweak
* remove unnecessary assignments
* replace hack code with good one
* refactor coords in arg
* resize NW
* resize from sw,ne
* fix with setResizeHandle
* do not show hint while resizing multiple elements
* empty commit
* fix format
2020-04-07 10:49:59 +02:00
David Luzar and GitHub
e9b4700bba
edit text when clicked on with text tool ( #1283 )
2020-04-06 22:26:54 +02:00
18f0b76231
Bump prettier from 2.0.2 to 2.0.3 ( #1263 )
...
* Bump prettier from 2.0.2 to 2.0.3
Bumps [prettier](https://github.com/prettier/prettier ) from 2.0.2 to 2.0.3.
- [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/2.0.2...2.0.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com >
* Format
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com >
2020-04-06 14:21:07 +03:00
Daishi Kato and GitHub
4003fa24b2
fix #1254 ( #1255 )
2020-04-05 20:54:27 -07:00
David Luzar and GitHub
81b38d8808
fix wysiwyg event cleanup ( #1248 )
2020-04-05 22:31:59 +02:00
David Luzar and GitHub
4dd947b261
fix scrollToCenter when no elements supplied ( #1222 )
...
* fix scrollToCenter when no elements supplied
* make getCommonBounds return default values on empty elements
2020-04-04 18:45:14 +02:00
José Quinto and GitHub
030954badb
shift locking 22.5 degree and move to constants ( #1216 )
...
* shift locking 22.5 degree and move to constants #1171
* review SHIFT_LOCKING_ANGLE
2020-04-04 14:55:22 +03:00
Lipis and GitHub
ae1eee15cc
Replace ev -> event ( #1209 )
2020-04-04 10:41:54 +02:00
David Luzar and GitHub
8030a167c6
make text committing cross-platform ( #1188 )
2020-04-03 15:56:23 +02:00
alaoui abdellah and GitHub
980d08ce56
Add support for committing a text entry on cmd/shift click ( #1185 )
2020-04-03 15:41:32 +03:00