Commit Graph

544 Commits

Author SHA1 Message Date
Lipis cd3083e8e6 New translations en.json (French) (#1190) 2020-04-03 09:45:37 -04:00
Lipis c1b067a8b9 New Crowdin translations (Dutch) (#1187)
* New translations en.json (Dutch)

* Update i18n.ts
2020-04-03 16:06:30 +03:00
alaoui abdellah 980d08ce56 Add support for committing a text entry on cmd/shift click (#1185) 2020-04-03 15:41:32 +03:00
Adil HADDAOUI b9b58d4464 Change arabic language name (#1184) 2020-04-03 15:40:01 +03:00
Lipis c240fff0c5 New Crowdin translations (mostly Arabic updates) (#1181) 2020-04-03 15:32:00 +03:00
David Luzar 4912a29e75 sync intermediate text updates (#1174)
* sync intermediate text updates

* fix initial render text position

* batch updates

* tweak onChange subscription
2020-04-03 14:16:14 +02:00
Kostas Bariotis 0c9459e9e5 Warn on invalid JSON file (#1159)
* add error dialog

* show error modal on file dnd

* add locales

* Update src/locales/en.json

Co-Authored-By: Lipis <lipiridis@gmail.com>

* Update src/data/blob.ts

* Update src/data/blob.ts

* fix titles, update snapshots

* make modal smaller

* fix dnd wrong file type

* reset errorMessage

Co-authored-by: Faustino Kialungila <faustino.kialungila@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-04-03 13:50:51 +02:00
Lipis 2be34effd4 New Crowdin translations (#1178)
* New translations en.json (Norwegian)

* New translations en.json (Norwegian)
2020-04-03 12:59:26 +03:00
Christopher Chedeau 27075b028c Update zoom refresh (#1180)
One second feels way too long. Let's try 300ms
2020-04-02 23:56:14 -07:00
Christopher Chedeau 79557676c2 Revert "simulate a db tap on mobile to insert text (#1155)" (#1179)
This reverts commit 56034eacb0.
2020-04-02 23:47:39 -07:00
José Quinto efa8b95c52 fix scrollbar and toolbar grid-gap #1170 (#1173) 2020-04-03 09:11:42 +03:00
Lipis a488555f30 New Crowdin translations (#1165)
* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Korean)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Indonesian)

* New translations en.json (German)

* New translations en.json (Arabic)

* New translations en.json (Greek)

* New translations en.json (Hungarian)

* New translations en.json (French)

* New translations en.json (Hungarian)

* New translations en.json (German)

* New translations en.json (Korean)

* New translations en.json (Polish)

* New translations en.json (Polish)

* New translations en.json (Polish)

* New translations en.json (Polish)

* New translations en.json (Polish)
2020-04-02 22:53:17 -04:00
Jed Fox 663526129a Proper RTL support (#1154)
* Add RTL styles. Most of the work is done by the browser 💖

* Refactor getLanguage

* Additional fixes

* Mirror the mouse pointer icon

* Move the vertical scrollbar to the left on RTL

* Revert "Mirror the mouse pointer icon"

This reverts commit f69b132538.
2020-04-02 12:21:19 -04:00
José Quinto 8fea75b84f fix for #1106 - Weird behavior when resize + shift a 2-point li… (#1152)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-04-02 11:46:05 +02:00
Daishi Kato 65be7973be Rotation support (#1099)
* rotate rectanble with fixed angle

* rotate dashed rectangle with fixed angle

* fix rotate handler rect

* fix canvas size with rotation

* angle in element base

* fix bug in calculating canvas size

* trial only for rectangle

* hitTest for rectangle rotation

* properly resize rotated rectangle

* fix canvas size calculation

* giving up... workaround for now

* **experimental** handler to rotate rectangle

* remove rotation on copy for debugging

* update snapshots

* better rotation handler with atan2

* rotate when drawImage

* add rotation handler

* hitTest for any shapes

* fix hitTest for curved lines

* rotate text element

* rotation locking

* hint messaage for rotating

* show proper handlers on mobile (a workaround, there should be a better way)

* refactor hitTest

* support exporting png

* support exporting svg

* fix rotating curved line

* refactor drawElementFromCanvas with getElementAbsoluteCoords

* fix export png and svg

* adjust resize positions for lines (N, E, S, W)

* do not make handlers big on mobile

* Update src/locales/en.json

Alright!

Co-Authored-By: Lipis <lipiridis@gmail.com>

* do not show rotation/resizing hints on mobile

* proper calculation for N and W positions

* simplify calculation

* use "rotation" as property name for clarification (may increase bundle size)

* update snapshots excluding rotation handle

* refactor with adjustPositionWithRotation

* refactor with adjustXYWithRotation

* forgot to rename rotation

* rename internal function

* initialize element angle on restore

* rotate wysiwyg editor

* fix shift-rotate around 270deg

* improve rotation locking

* refactor adjustXYWithRotation

* avoid rotation degree becomes >=360

* refactor with generateHandler

Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-04-02 10:40:26 +02:00
Lipis 3e3ce18755 New translations en.json (Greek) (#1163) 2020-04-02 09:56:59 +02:00
Sanghyeon Lee 634410ad48 Modify action buttons visibility for desktop (#1156) 2020-04-02 09:52:24 +02:00
Lipis ffec3af635 New Crowdin translations (#1160)
* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (French)
2020-04-02 09:49:02 +02:00
Mohit kumar Bajoria 9b6700755a Add new line on Enter (#1161)
* Add new line on Enter

Fixes #1158

* Fix lint
2020-04-02 01:41:42 +02:00
Faustino Kialungila 56034eacb0 simulate a db tap on mobile to insert text (#1155) 2020-04-01 21:44:09 +02:00
Lipis 0e90996715 New Crowdin translations (#1151)
* New translations en.json (Arabic)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Korean)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Indonesian)

* New translations en.json (German)

* New translations en.json (Arabic)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Arabic)

* New translations en.json (Polish)

* New translations en.json (Arabic)

* New translations en.json (French)

* New translations en.json (German)

* Update i18n.ts

* New translations en.json (German)
2020-04-01 13:49:49 -04:00
Sanghyeon Lee 86d0da5204 Add duplicate button for mobile view (#1146)
* Add a icon for dulplication

* Add PanelComponent for duplication

* Add duplicate button for mobile

* Add styles for layout action buttons

* Add a translation for 'Actions'

* Show left action buttons only for desktop

* Add duplicate button at the bottom of mobile

It is provided depending on whether or not it is `multiElement` to maintain space between buttons.
2020-04-01 18:13:53 +03:00
Lipis 1a47ff5c52 New Crowdin translations (#1145) 2020-03-31 18:14:50 +03:00
Lipis e2e4f3c805 New Crowdin translations (Greek) (#1118) 2020-03-31 14:44:29 +03:00
Brock Balducci 81d4f611a3 add action ui for deleting an element - #1125 (#1140) 2020-03-31 11:54:42 +03:00
Kostas Bariotis 4ecbbab7da Add sentry integration (#1141) 2020-03-31 11:37:51 +03:00
Christopher Chedeau a7bd21ccf2 Avoid broadcasting what was just received (#1116)
Fixes #1115

The issue is that replaceAllElements calls a render synchronously, preventing lastBroadcastedOrReceivedSceneVersion from being set correctly.

I tried using batchUpdate but it only takes a single argument ( https://github.com/facebook/react/blob/c5d2fc7127654e43de59fff865b74765a103c4a5/packages/react-reconciler/src/ReactFiberWorkLoop.js#L1088 ) whereas the callback takes two.

Test Plan:
- Add a console.log before `this.broadcastScene("SCENE_UPDATE");` in App.tsx
- Connect a bunch of clients
- Have one move a shape
- Make sure that this client has the console logged
- Make sure the other clients don't have it
2020-03-28 21:25:40 -07:00
Sanghyeon Lee 763735ac84 Add SCENE_INIT broadcast type for new user (#1095) 2020-03-28 19:35:56 -07:00
Christopher Chedeau 8e6d55cf75 Fix corner resize for multi-point arrows (#1105)
The logic to support it was not implemented. This is not the prettiest way to solve it in the world but it does work. Some more refactoring here is probably warranted.

Fixes #1039
2020-03-28 18:08:21 -07:00
Christopher Chedeau 24fa657093 Don't reset cache while zooming using a gesture (#1103)
* Don't reset cache while zooming using a gesture

This reuses the cached canvas while the gesture is happening. Once it has stop updating, then recompute the cache with the proper zoom.

This should massively improve performance when panning on big scenes on mobile

Fixes #1056

* update snapshot tests
2020-03-28 16:59:36 -07:00
Kent Beck 95eaadeb85 Refactor paste code (#1102) 2020-03-28 15:43:09 -07:00
Christopher Chedeau 6056170d4b Fix wysiwyg center (#1101)
This wasn't taking into account zoom properly.

The logic should probably get refactored a bit, it's not ideal that we're passing canvas, state and scale as different arguments. Also it's weird that the function that returns the center is computing the viewport translation. But I'm not motivated enough to fix it right now...

Fixes #1100
2020-03-28 14:30:41 -07:00
Kent Beck aa54364bd6 Use existing helper to copy all state (#1098) 2020-03-27 15:18:14 -07:00
Lipis 2a373571f8 Change order of the fill options (#1097) 2020-03-27 19:38:03 +02:00
Lipis 90c83927ad New Crowdin translations (#1089) 2020-03-27 14:12:27 +02:00
David Luzar cac2dda5ac Add loading state (#1027)
* add loading state

* update snapshots

* add border radius

* fix comment breaking build jsx
2020-03-26 18:28:26 +01:00
Sanghyeon Lee d8708cb14f Apply scroll-back-to-content's z-index only for mobile (#1086)
ref: https://github.com/excalidraw/excalidraw/pull/1002/files#diff-6a2256f44598ec970b4bd034962e011eR376
2020-03-26 13:22:15 +02:00
David Luzar 6fd2a3b2e5 fix z-index action to account for deleted elems and add tests (#1077) 2020-03-26 00:28:50 -07:00
Lipis fb82715ef7 New Crowdin translations (#1085)
* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Traditional)
2020-03-25 22:50:53 +01:00
Sanghyeon Lee 051a946438 Add Enter key handler that can start text editing (#1084)
* Add handler that can start text editing with Enter key

* Refine `startTextEditing` parameters

* Apply prettier fixes
2020-03-25 17:12:51 +01:00
Marcel Kloubert 12d7550958 fixed generateCollaborationLink() (#1081) 2020-03-25 17:18:22 +02:00
Faustino Kialungila 4442addc02 Type action names (#1079)
* Type action names

* improve typing

Co-authored-by: dwelle <luzar.david@gmail.com>
2020-03-25 14:13:59 +01:00
Lipis 9cc1037e7b New Crowdin translations (#1076) 2020-03-25 12:35:29 +02:00
David Luzar 42df058223 load from localStorage only if not in multiplayer (#1074) 2020-03-24 09:57:59 -07:00
Sanghyeon Lee 104e48b6cb Add the shape lock button for mobile (#1054) 2020-03-24 12:51:49 +02:00
Lipis e38045ccad New Crowdin translations (#1055)
* New translations en.json (Norwegian)

* New translations en.json (Norwegian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (French)

* New translations en.json (German)

* New translations en.json (Indonesian)

* New translations en.json (Norwegian)

* New translations en.json (Polish)

* New translations en.json (Portuguese)

* New translations en.json (Russian)

* New translations en.json (Spanish)

* New translations en.json (Turkish)

* New translations en.json (Korean)

* New translations en.json (Chinese Traditional)

* New translations en.json (Hungarian)

* New translations en.json (Norwegian)

* New translations en.json (French)
2020-03-24 09:55:29 +01:00
Pete Hunt bd7856adf3 Much more thorough tests! (#1053) 2020-03-23 16:38:41 -07:00
David Luzar cf4fa30a57 tweak png copy button label (#1062)
* tweak png copy button label

* fix lint
2020-03-23 16:15:22 +01: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
Lipis c7f10c5de2 New Crowdin translations (#1049)
* New translations en.json (German)

* New translations en.json (German)

* New translations en.json (German)
2020-03-22 23:01:38 +02:00