Commit Graph

1529 Commits (fd4460be3787088a5a46daecedc52aabb00cc9b9)

Author SHA1 Message Date
dependabot[bot] 91b4109f67
chore(deps-dev): bump webpack-bundle-analyzer in /src/packages/utils (#2626)
Bumps [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/webpack-contrib/webpack-bundle-analyzer/releases)
- [Changelog](https://github.com/webpack-contrib/webpack-bundle-analyzer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/webpack-bundle-analyzer/compare/v4.2.0...v4.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
dependabot[bot] 6e45cb95db
chore(deps-dev): bump webpack in /src/packages/utils (#2627)
Bumps [webpack](https://github.com/webpack/webpack) from 5.10.1 to 5.11.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.10.1...v5.11.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
dependabot[bot] 5edf82898b
chore(deps-dev): bump @babel/preset-env in /src/packages/utils (#2628)
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.12.10 to 7.12.11.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.11/packages/babel-preset-env)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
Lipis 5d6590c200
ci: Update the coverage report for i18n PRs (#2592)
Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Andrés Rivera fb582b45db
fix: Fix centering element on init (#2445)
Co-authored-by: Andrés Rivera <andres@MBP.local>
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Jaiwanth 7e9fdf85a0
fix: Dropdown for Arrowheads overflow (#2596)
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar 98c26642d0
fix: hide collab button when onCollabButtonClick not supplied (#2598) 4 years ago
Kartik Prajapati f919907855
Enhance delete button in context menu (#2591) 4 years ago
Aakansha Doshi 8729ab3c54
chore(package/utils): update deps (#2593) 4 years ago
Aakansha Doshi c783763307
chore(package/excalidraw): update deps (#2589) 4 years ago
dependabot[bot] f151f45df8
Bump webpack from 4.42.0 to 4.44.2 in /src/packages/utils (#2554)
Bumps [webpack](https://github.com/webpack/webpack) from 4.42.0 to 4.44.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v4.42.0...v4.44.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
dependabot[bot] f33880e005
Bump @babel/plugin-transform-arrow-functions in /src/packages/utils (#2558)
Bumps [@babel/plugin-transform-arrow-functions](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-arrow-functions) from 7.8.3 to 7.12.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.12.1/packages/babel-plugin-transform-arrow-functions)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
dependabot[bot] 29ed50f6ea
Bump webpack-cli from 3.3.11 to 4.2.0 in /src/packages/excalidraw (#2571)
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 3.3.11 to 4.2.0.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/v3.3.11...webpack-cli@4.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
4 years ago
Lipis ce52c18382
fix: Add width/height for the lines in charts (#2586)
Co-authored-by: David Luzar <luzar.david@gmail.com>
4 years ago
Lipis 3b86944365
chore: New Crowdin updates (#2480) 4 years ago
João Forja 4c7b1a2269
fix: Visibility and zooming when canvas offset is not zero (#2534) 4 years ago
Kartik Prajapati 60864ace54
feat: Add tooltip with icon for embedding scenes (#2532)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Daishi Kato 4b32c03994
feat: export exportToCanvas in utils (#2583) 4 years ago
Zen Tang 5abe9b93e8
feat: Add zoom to fit for selected elements (#2522) 4 years ago
Aakansha Doshi 59cff0f219
ci: Add github action to make sure changelog for @excalidraw/excalidraw is updated (#2518)
Add guidelines for changelog and group the commits
update the changelog with the latest commits since the last release
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Lipis 81c17a56fb
RTL support for the stats dialog (#2530) 4 years ago
Zen Tang 802b8c50d5
Insert Library items in the middle of the screen (#2527)
Co-authored-by: Zen Tang <zen@wayve.ai>
4 years ago
Rene 94fe1ff6e6
Show shortcut context menu (#2501)
Co-authored-by: rene_mbp <harryloveslearning@googlemail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Steve Ruiz 9cfe7b45e5
Aligns arrowhead schemas (#2517) 4 years ago
Steve Ruiz 9cf54041dc
Expand canvas padding based on zoom. (#2515) 4 years ago
Kartik Prajapati 8f269eb840
Fix Library Menu Layout (#2502) 4 years ago
Zen Tang 1a134a88bd
Add Cut to menus (#2511)
Co-authored-by: Zen Tang <zen@wayve.ai>
4 years ago
David Luzar ae15380a9f
hide stats and scrollToContent-button when mobile menus open (#2509) 4 years ago
Lipis 0efa62cf7c
Hide shortcuts on pickers for mobile (#2508) 4 years ago
Steve Ruiz c742225f43
More Arrowheads: dot, bar (#2486)
Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Lipis 7c7fb4903b
Don't throw error when localStorage is null (#2505) 4 years ago
dependabot[bot] a4e1f2c5c1
Bump ini from 1.3.5 to 1.3.7 in /src/packages/utils (#2499)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
dependabot[bot] 068c9b4876
Bump ini from 1.3.5 to 1.3.7 in /src/packages/excalidraw (#2500)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago
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 years ago
Aakansha Doshi 7bfe7a1924
docs(readme.md): Update the homepage URL so it redirects to correct readme (#2498)
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Aakansha Doshi 48e27f327f
Final steps before the release of @excalidraw/excalidraw (#2464)
* docs(packages/excalidraw): add read me
* Add changelog and update version
4 years ago
Thomas Steiner 182a3e39e1
Add "Safari" to PWACompat loading condition
They froze the UA string on iPad.
4 years ago
David Luzar 4672a2a135
fix misaligning on grid paste (#2494)
* fix misaligning on grid paste

* tweak naming
4 years ago
Lipis c7b5cdb71e
Reduce the maximum size of the binding gap (#2450) 4 years ago
Aakansha Doshi 8f8fd023f8
fix(app.tsx): add safe check for readyPromise (#2489)
* fix(app.tsx): add safe check for readyPromise

* make type-safe

Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Aakansha Doshi 88fc961559
add separate entry point for fonts as its messing up the js bundle (#2485) 4 years ago
Steve Ruiz c291edfc44
Add Arrowheads to Arrows (#2452)
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Aakansha Doshi bd8e860d7f
move all chunks inside excalidraw-assets folder when bundling (#2484) 4 years ago
David Luzar 3be5038c14
Revert "Remove native gesture "support" from iOS (#2457)" (#2483)
This reverts commit 2b6d1470f9.
4 years ago
Lipis 5e57f408c5
Add link to the public libraries (#2469) 4 years ago
Lipis dd993adc5c
Add stats for nerds (#2453)
Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
João Forja aa221837fc
Enhance aspect ratio tools | Rectangle, Diamond, Ellipses (#2439)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Aakansha Doshi 4c90ea5667
chore(package.json): set public access for npm packages (#2463) 4 years ago
Christopher Chedeau 5071cffb02
Fix scrollbars when no elements (#2460)
I already fixed this but a special case for no elements was added in getCommonBounds to return 0 and reintroduce this bug. I'm not exactly sure where to put this check tbh. Fixing it here so that I'm not annoyed anymore at least.

I checked some of the callsites, some of them related to selection will never pass an empty array, some to export will break if we remove the 0, 0, 0, 0 fix.
4 years ago
Faustino Kialungila fb02329c11
show lockicon on a second row on mobile (#2462)
* show lockicon on a second row

* fix darkMode toggle acting as a lock icon

Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Christopher Chedeau 6081bb5941
Do not override cmd/ctrl-f for search (#2461)
F is full screen but we shouldn't override cmd/ctrl-f for search. It's useful for searching in the list of keywords
4 years ago
Christopher Chedeau 533815c081
Fix middle handles on mobile (#2459)
For rendering we always use mouse in order to check which handles to display but when doing the hit test, we used pointer which has a different size. So we couldn't use the middle handles for small shapes. This is now fixed.

cc @j-f1 as you added it in #790
4 years ago
Christopher Chedeau 2b6d1470f9
Remove native gesture "support" from iOS (#2457)
We were processing both the touch move and gesture on iOS which was first firing twice as many set state, but also caused issues:
- The gesture implementation didn't support zooming on the center
- Touching down on a circle and then on the bottom chrome would freak out because initialScale was null

Touching down on the menu still isn't perfect as it shifts the shape around but doesn't completly break the zoom
4 years ago
Christopher Chedeau 545b214558
Don't open context menu when multi-touch (#2455)
This was very annoying when you would zoom on mobile and the context menu would appear.

The problem was the following:
- You put a finger in, it creates a timeout
- You put a second finger in, it creates another timeout
- 300ms elapsed, which is not that much
- The context menu opens
- Now you move your fingers, which works, but the context menu is still open

The fix is to invalidate the context menu if a second finger is added even if the first one hasn't moved.
4 years ago
Aakansha Doshi e617ccc252
Factor out collaboration code (#2313)
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis d8a0dc3b4d
Add events on load (#2451) 4 years ago
Lipis e392bebc40
Add library events (#2448) 4 years ago
Lipis a2132c9bb7
New Crowdin weekly updates (#2420)
Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Lipis 66e5b18e4e
Add more events for sharing and refactor I/O, dialogs (#2443) 4 years ago
Panayiotis Lipiridis c43109a230 Don't count first load 4 years ago
Lipis 668150a667
More events for layers, align, colors and swap name <=> category (#2442) 4 years ago
Lipis 0ef60dce2d
More export events (#2441) 4 years ago
Lipis abde1daba4
Add basic event actions to analytics (#2375)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis 014097a97e
refactor: Stop using the deprecated keyCode (#2426)
Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: David Luzar <luzar.david@gmail.com>
4 years ago
David Luzar 36980160ae
Revert "Remove unused project name from export dialog (#2427)" (#2436) 4 years ago
Aakansha Doshi 084aff2bf3
fix(app.tsx): use cursorx, cursory in onGestureChange as pointers are empty (#2424) 4 years ago
Lipis bdb1fb2dae
Add border to the Avatars (#2428) 4 years ago
Lipis b21fd49412
chore: Minor refactoring for consistency (#2425) 4 years ago
Lipis 204c8370a0
Remove unused project name from export dialog (#2427)
* Remove unused project name from export dialog

* snaps
4 years ago
Aakansha Doshi ca60244aa3
hide fill icons when fill color transparent (#2414)
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
4 years ago
Luo 6c0296c434
click on library icon should toggle the LibraryMenu (#2421)
Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Lipis 1269b9ab17
New Crowdin updates (Persian) (#2418) 4 years ago
Lipis 2f9a849170
New Crowdin updates (Removed languages that were less than 30% in Crowdin) (#2417) 4 years ago
Jed Fox 8d479ab238
RTL updates (#2416)
* Update a bunch of icons to be mirrored in RTL

* Fix RTL layout issues in in zen mode and collaboration

* Small change to the shortcuts dialog to make isRTL unnecessary

* Tweaks to alignment in RTL
4 years ago
Steve Ruiz fec48060f7
Improves distribute algorithm (#2415)
* Update disitrubte.ts

* Update disitrubte.ts

* Simplifies operations

* Combines algorithms
4 years ago
Lipis 2de7f73a71
New Crowdin updates (#2407)
* New translations en.json (Arabic)

* New translations en.json (Slovak)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Burmese)

* New translations en.json (Hindi)

* New translations en.json (Norwegian Nynorsk)

* New translations en.json (Tamil)

* New translations en.json (Persian)

* New translations en.json (Indonesian)

* New translations en.json (Galician)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Ukrainian)

* New translations en.json (Turkish)

* New translations en.json (Swedish)

* New translations en.json (Albanian)

* New translations en.json (Portuguese)

* New translations en.json (Korean)

* New translations en.json (German)

* New translations en.json (Russian)

* New translations en.json (Romanian)

* New translations en.json (French)

* New translations en.json (Spanish)

* New translations en.json (Bulgarian)

* New translations en.json (Catalan)

* New translations en.json (Greek)

* New translations en.json (Polish)

* New translations en.json (Finnish)

* New translations en.json (Hebrew)

* New translations en.json (Hungarian)

* New translations en.json (Italian)

* New translations en.json (Japanese)

* New translations en.json (Dutch)

* New translations en.json (Hausa)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (German)

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Finnish)

* New translations en.json (Norwegian Bokmal)

* Auto commit: Calculate translation coverage

* New translations en.json (Indonesian)

* Auto commit: Calculate translation coverage

* New translations en.json (Chinese Traditional)

* Auto commit: Calculate translation coverage

* New translations en.json (Ukrainian)

* Auto commit: Calculate translation coverage

* New translations en.json (Italian)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Steve Ruiz 198106e297
Add distribute actions. (#2395) 4 years ago
dependabot-preview[bot] 6718902645
Bump prettier from 2.1.2 to 2.2.0 (#2401)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis 7aa58561c8
New Crowdin updates (#2394)
* New translations en.json (French)

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Lipis ca3cf6971d
New Crowdin updates (#2364)
* New translations en.json (Arabic)

* Auto commit: Calculate translation coverage

* New translations en.json (Korean)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Rene a1fbec1030
Remove last committed point json (#2371)
Co-authored-by: rene_mbp <harryloveslearning@googlemail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar bf143ed0b8
ignore CapsLock when handling keyDown event (#2373)
* ignore CapsLock when handling keyDown event

* fix `this`
4 years ago
David Luzar 68aafe31f9
fix portal teardown (#2370) 4 years ago
David Luzar 5b829772d9
Fix library import (#2360) 4 years ago
Lipis dad9ad9bf4
don't reset specific appState props on canvas clear (#2359)
Co-authored-by: David Luzar <luzar.david@gmail.com>
4 years ago
Lipis d2a730837e
New Crowdin updates (#2332) 4 years ago
Lipis a20f3240fd
Prefer arrow functions (#2344) 4 years ago
Lipis e05acd6fd9
Update ESLint rules (#2342) 4 years ago
David Luzar 56938cf874
fix modal island ref init (#2341)
* fix modal island ref init

* remove unnecessary sIP

* naming
4 years ago
Lipis 5d295415db
Keep errors, elements and comments consistent (#2340)
Co-authored-by: David Luzar <luzar.david@gmail.com>
4 years ago
Noel Schnierer 2a20c44338
fix: fonts not cached by service worker (#2338) 4 years ago
Aakansha Doshi dcedd17f57
Add bundle analyzer to webpack behind env variable (#2330) 4 years ago
David Luzar 455badb23e
fix export preview flicker (#2335) 4 years ago
João Forja 566e6a5ede
Zoom on cursor | Issue #940 (#2319) 4 years ago
Lipis facde7ace0
Fix padding in the library loading buttons (#2331)
* Fix padding in the library loading buttons

* Update src/components/Stack.tsx

Co-authored-by: Dominic Lee <34794189+dominictwlee@users.noreply.github.com>

* extend CSSProperties TS definition

Co-authored-by: Dominic Lee <34794189+dominictwlee@users.noreply.github.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis eca2bdabcc
New Crowdin updates (#2311) 4 years ago
Guillaume Grossetie a7da8901d8
Excalidraw export (#2246) 4 years ago
Noel Schnierer 7491fcc3f3
use icons for toggle labels (#2315) 4 years ago
Sven Kube 856ab50090
Feature: Align elements (#2267)
Co-authored-by: Maximilian Massing <maximilian.massing@googlemail.com>
Co-authored-by: Sven Kube <github@sven-kube.de>
Co-authored-by: Maximilian Massing <massing@sipgate.de>
4 years ago
David Luzar 411bc2aa0a
SW fix (#2320) 4 years ago
David Luzar ba3f548b91
Fix library dnd (#2314) 4 years ago
dependabot-preview[bot] 8a50916ef2
Bump firebase from 7.24.0 to 8.0.0 (#2294)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar 56215c6c2b
remove eslint two disabled rules & fix (#2309) 4 years ago
Giacomo Debidda fc58e51ab3
Show error message when canvas to export is too big (#1256) (#2210)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Geraint 5c26bd19d7
SVG export: add image size (#2292) 4 years ago
Lipis 9de6c947ef
Update react-scripts, TS and remove ESlint as it exist in CRA (#2302)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
dependabot-preview[bot] 44af6b4a78
Bump react and react-dom (#2300)
* Bump react and react-dom

Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom). These dependencies needed to be updated together.

Updates `react` from 16.14.0 to 17.0.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v17.0.1/packages/react)

Updates `react-dom` from 16.14.0 to 17.0.1
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v17.0.1/packages/react-dom)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
4 years ago
Lipis 9e40dcdcdc
New Crowdin updates (#2286)
* New translations en.json (Chinese Simplified)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Andrew Aquino 5e55e77f54
enable ColorPicker keyboard shortcuts if using custom color (#2288) 4 years ago
David Luzar f404ab6f50
clear deleted elements on room create (#2270) 4 years ago
David Luzar 915bda9fd8
restore elements on load from firebase (#2269) 4 years ago
Lipis 36700b9376
New Crowdin updates (#2248)
Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar 900e0f27ad
expose resetHistory & factor out from updateScene (#2277) 4 years ago
Aakansha Doshi e916d7f6f6
expose resetScene and getSceneElementsIncludingDeleted && move excalidrawApp to excalidraw-app folder (#2272)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Aakansha Doshi 1845b5e32c
build(webpack): apply optimization to async chunks so module is exported correctly (#2273) 4 years ago
David Luzar 72a3450c99
allow to supply canvas offsets from upstream (#2271) 4 years ago
Aakansha Doshi 499a60309f
factor reconcilation out of `updateScene` & remove `replaceAll` (#2266)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Aakansha Doshi 1034ec91b8
fix(fonts): move fonts to public folder so that its served as static assets via cra & works in export (#2264) 4 years ago
Aakansha Doshi 6db5647048
move broadcastScene and broadcastMouseLocation to portal (#2262) 4 years ago
Aakansha Doshi 12b73aaac6
fix(app.scss): Move fonts from public to fonts directory so that it can be included in bundle as well (#2251) 4 years ago
Danila b50c54f855
Add and use clsx (classnames alternative) (#2249)
Co-authored-by: David Luzar <luzar.david@gmail.com>
4 years ago
David Luzar 1484c5a63b
fileHandle refactor & fixes (#2252) 4 years ago
Aakansha Doshi 4a26845395
enable code splitting and add chunk names to dynamic import and create separate chunk vendor for all node modules (#2245)
* build: increase Limit chunk to enable code splitting add chunk names to dynamic import

* Remove limitchunkcount and have separate chunk for each node module so we dnt have any unnamed id.js chunks

* fix

* create one chunk for all node modules

* Add caret to peer deps

* extra space
4 years ago
Pierre-Monier 41ccd47791
feat: add a proper error message when file is too big (#2247) 4 years ago
Lipis 8f5c5f80d3
New Crowdin updates (#2242) 4 years ago
David Luzar 538f2be097
add export error handling (#2243) 4 years ago
David Luzar 25d460be96
don't touch DOM outside useEffect (#2215) 4 years ago
David Luzar b3263c2a69
fix encoding of embed data & compress (#2240) 4 years ago
Lipis e8a39b5f84
New Crowdin updates (#2233)
Bunch of updates
4 years ago
David Luzar f40a2230ec
Fix embedding scene to PNG on Safari (#2235) 4 years ago
David Luzar 5950fa9a40
support embedding scene data to PNG/SVG (#2219)
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
David Luzar 7618ca48d7
retain local appState props on restore (#2224)
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Lipis d012fda59d
New Crowdin updates (#2214)
* New translations en.json (Indonesian)

* New translations en.json (Polish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Hindi)

* New translations en.json (Norwegian Nynorsk)

* New translations en.json (Tamil)

* New translations en.json (Galician)

* New translations en.json (Vietnamese)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Ukrainian)

* New translations en.json (Turkish)

* New translations en.json (Swedish)

* New translations en.json (Albanian)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Dutch)

* New translations en.json (Persian)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Hebrew)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Catalan)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Romanian)

* New translations en.json (Nepali)

* Auto commit: Calculate translation coverage

* New translations en.json (French)

* New translations en.json (Portuguese)

* New translations en.json (Chinese Traditional)

* New translations en.json (Norwegian Bokmal)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Dutch)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Catalan)

* Auto commit: Calculate translation coverage

* New translations en.json (Spanish)

* New translations en.json (Catalan)

* New translations en.json (Italian)

* Auto commit: Calculate translation coverage

* New translations en.json (Italian)

* New translations en.json (Portuguese)

* Auto commit: Calculate translation coverage

* New translations en.json (Finnish)

* Auto commit: Calculate translation coverage

* New translations en.json (Indonesian)

* Auto commit: Calculate translation coverage

* New translations en.json (German)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Aakansha Doshi 63566ecb92
Expose update scene via refs (#2217)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Michal Srb 8a10f2a0b8
Fix collision check for rectangles and rendering of binding area (#2221) 4 years ago
Aakansha Doshi 3835fa60e4
pass named function to react.memo so in dev tools it doesn't show as anonymous (#2216)
This makes debugging easier as well
4 years ago
Andrew Aquino 215128ffdf
add titles with width/height to scale buttons in ExportDialog (#2193) 4 years ago
David Luzar d18a72c879
save room to firebase on unload or portal close (#2207)
* save on unload or portal close

* align naming
4 years ago
David Luzar ae1ab1ab37
clear scene when joining a room (#2208)
* clear scene when joining a room

* code shuffle

* remove noop code path
4 years ago
Chrisando Pramudhita e424ca53c6
fix inconsistent text element color on dark mode while editing. (#2196)
On dark mode, while text element is being edited, it was changing color to the light mode variant (white turns back to black, etc...).

This is caused by the --appearance-filter not being applied to the floating textarea. The css var --appearance-filter is only applied to the .excalidraw class while the floating textarea is being appended to the body which put it outside of .excalidraw.

This change adds excalidraw class to the floating textarea and also adds Appearance_dark to it while dark mode is on.
4 years ago
Lipis 16d3d2fb54
New Crowdin updates (#2195) 4 years ago
Christopher Chedeau 6ca7420252
Remove warning about rooms not being persisted (#2199) 4 years ago
Pete Hunt d0985fe67a
Persistent rooms via Firebase (#2188)
* Periodically back up collaborative rooms in firebase

* Responses to code review

* comments from code review, new firebase credentials
4 years ago
Lipis f2135ab739
New Crowdin updates (#2187) 4 years ago
Pete Hunt 8ab9ffbe28
One-click installable libraries (#2179)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Aakansha Doshi a61b212220
scope css under name space excalidraw (#1983) 5 years ago
David Luzar adb1ac5788
fix restoring appState (#2182) 5 years ago
Thomas Steiner b2822f3538
Make File Handling actually work (#2181)
Follow-up from #1736
5 years ago
Pete Hunt 68bdfaefbe
Fix pinch-to-zoom performance (#2171) 5 years ago
Lipis 2a2630082f
New Crowdin updates (#2166) 5 years ago
Pete Hunt e3f3427b31
Fix middle mouse panning on windows (#2172) 5 years ago
Lipis 7d7ce04e9b
Add Swedish to the picker 5 years ago
Lipis fbc4c70ed8
New Crowdin updates (#2130)
* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

* New translations en.json (Turkish)

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* New translations en.json (French)

* Auto commit: Calculate translation coverage

* New translations en.json (Polish)

* Auto commit: Calculate translation coverage

* New translations en.json (Italian)

* Auto commit: Calculate translation coverage

* New translations en.json (French)

* New translations en.json (Arabic)

* New translations en.json (Arabic)

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Indonesian)

* Auto commit: Calculate translation coverage

* New translations en.json (Chinese Simplified)

* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (Nepali)

* Auto commit: Calculate translation coverage

* New translations en.json (Norwegian Nynorsk)

* Auto commit: Calculate translation coverage

* New translations en.json (Norwegian Nynorsk)

* Auto commit: Calculate translation coverage

* New translations en.json (Polish)

* Auto commit: Calculate translation coverage

* New translations en.json (Polish)

* Auto commit: Calculate translation coverage

* New translations en.json (Hindi)

* Auto commit: Calculate translation coverage

* New translations en.json (Hindi)

* Auto commit: Calculate translation coverage

* add nepali to language picker

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Swedish)

* Auto commit: Calculate translation coverage

* New translations en.json (Japanese)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
João Forja 242ccac290
Arrows binds/unbinds to bindable elements when moved with arrow keys (Issue #2103) (#2150) 5 years ago
Robert van Hoesel c6736fa14e
Lock drag direction using `Shift` (#1858)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar d07099aadd
fix zindex to account for group boundaries (#2065) 5 years ago
Thomas Steiner 48c2a13c7a
Pass file extensions with leading dot after API change (#2149) 5 years ago
David Luzar aaddde5dd9
Fix history initialization (#2115) 5 years ago
Mohamed Saleh 9cac7816cc
Fix textbox element bindings on size changes (#2145)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar 47dba05c91
System clipboard (#2117) 5 years ago
Panayiotis Lipiridis 640dcc90c2 A silly one :) 5 years ago
Michal Srb 15e4b51bb1
Fix binding disabling when taking screenshots on macOS (#2129)
* Fix binding disabling when taking screenshots on macOS
* Update snapshot for cmd+click test
5 years ago
Lipis 924292dc9a
New Crowdin updates (#2128)
* New translations en.json (Romanian)

* New translations en.json (Romanian)

* New translations en.json (Romanian)

* New translations en.json (Romanian)

* New translations en.json (Chinese Simplified)

* Auto commit: Calculate translation coverage

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
5 years ago
Lipis a693b36d37
New Crowdin updates (#2127)
* New translations en.json (Russian)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
5 years ago
Lipis 98a4d0a595
New Crowdin updates (#2116) 5 years ago
Danila b215e165d2
Fix HintViewer positioning (#2124) 5 years ago
Thomas Steiner 730a11e0a5
Assign file handle to dropped files (#2125)
Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
João Forja 0ab58b38e0
Fix bug of issue #2062 (#2108)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis 46bff3dace
New Crowdin updates (#2078)
* New translations en.json (Korean)

* New translations en.json (Korean)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* add ro-Ro to language picker

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Romanian)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Maurice Le Cordier d15444e232
allowed for sticking to grid when pasting an element (#2107) 5 years ago
Michal Srb 7ebeae2d38
Fix arrow rebinding on rotation (take 2) (#2104)
* Clear up test, fix simple rotation
* Fix eligibility rules
5 years ago
David Luzar 26ef235019
rebind arrow on rotation (#2096) 5 years ago
David Luzar 0e28177ccc
fix collab MOUSE_LOCATION payload naming for legacy versions (#2098) 5 years ago
Anton 1828a93ba7
Fix keypress rebinding (#2102)
Co-authored-by: Anton <anton.matrenin@introduct.tech>
5 years ago
Daishi Kato 84c49ebaa1
Support rotating two-point lines (angle can be non-zero) (#2090)
Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
David Luzar 8b9e2a540d
factor out test helpers (#2093) 5 years ago
David Luzar 4c2d34ffd7
select single element on cmd-click (#2087) 5 years ago
David Luzar b8f8bc2e32
fix group selection (#2092) 5 years ago
João Forja e7d186b439
Fix drag multiple elements bug (#2023)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Aakansha Doshi 4718c31da5
Pass Additional props remove localstorage related code for storing data and username from App.tsx to index.tsx (#2057)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Danila 0e0a695e81
Fix multiline hint text cropping (#2079)
Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Lipis 37b4883629
New Crowdin updates (#2054) 5 years ago
Pedro Baracho e34cf3aee3
Fix #2075 - Pinch zooming while typing text breaks the UI on Chrome Mac OS X (#2076) 5 years ago
Lipis c3de4cd4c5
Reduce the padding of the left 'Islands' (#2050) 5 years ago
Lipis 643e6bd08d
feat: Add hint for double click to insert text (#2056) 5 years ago
David Luzar ab7073abdb
add excalidraw_embed into base repo (#2040)
Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Thomas Steiner 80cbe13167
Make iOS "safe area" respect dark mode (#2053) 5 years ago
Lipis c6e2877418
New Crowdin updates (#2042)
* New translations en.json (Vietnamese)

* Auto commit: Calculate translation coverage

* add vi-VN to i18n

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis 415bf7bb5b
New Crowdin updates (#2022) 5 years ago
Warren Seine 4644ca1778
🎨 Use consistent naming (#2029) 5 years ago
Johann Hubert Sonntagbauer 009eba6315
feat: Zoom controls are pushed to the right edge for Right-To-Left languages (#2021) (#2037) 5 years ago
Warren Seine 14317c2232
🐛 Remove unnecessary class name props (#2027)
It's unused and serialized to `undefined`.
5 years ago
Daishi Kato 41cb1fbeba
feat: sharpness (#1931)
* feat: sharpness

* feat: fill sharp lines, et al.

* fix: rotated positioning

* chore: simplify path with Q

* fix: hit test inside sharp elements

* make sharp / round buttons work properly

* fix tsc tests

* update snapshots

* update snapshots

* fix: sharp arrow creation error

* fix merge and test

* avoid type assertion

* remove duplicate helper

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar 930813387b
make loading message account for dark mode & add i18n (#2033)
* make loading message account for dark mode & add i18n

* use app color scheme
5 years ago
David Luzar 3f2b0fdd0a
don't reset dark mode on canvas clear (#2032) 5 years ago
Warren Seine 2cb8ba6521
add explanation for why we mutate collaborators state (#2028)
* 🔒 Avoid mutating state

* revert to mutation and add explaining comment

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Warren Seine 5670c47789
🐛 Fix emoji rendering (#2030)
Thanks.
5 years ago
Michal Srb c0dd870c6e
Dark mode (#2006)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis 6e5b1a1c2a
New Crowdin updates (#1987) 5 years ago
João Forja 296e3677cf
Fix single element bounding box bug (#2008)
Co-authored-by: Michal Srb <xixixao@seznam.cz>
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar 964746e569
fix transform handles regression (#2018) 5 years ago
David Luzar 950bcd0b72
Refactor resize handle naming (#2013) 5 years ago
Michal Srb 85d000ccda
Add prevent binding keyboard shortcut to shortcuts dialog (#2010)
Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Michal Srb 8bbeb32e87
Fix text selection broken by PR1899 (#2011) 5 years ago
Michal Srb 26f67d27ec
Allow binding linear elements to other elements (#1899)
* Refactor: simplify linear element type

* Refactor: dedupe scrollbar handling

* First step towards binding - establish relationship and basic test for dragged lines

* Refactor: use zoom from appstate

* Refactor: generalize getElementAtPosition

* Only consider bindable elements in hit test

* Refactor: pull out pieces of hit test for reuse later

* Refactor: pull out diamond from hit test for reuse later

* Refactor: pull out text from hit test for reuse later

* Suggest binding when hovering

* Give shapes in regression test real size

* Give shapes in undo/redo test real size

* Keep bound element highlighted

* Show binding suggestion for multi-point elements

* Move binding to its on module with functions so that I can use it from actions, add support for binding end of multi-point elements

* Use Id instead of ID

* Improve boundary offset for non-squarish elements

* Fix localStorage for binding on linear elements

* Simplify dragging code and fix elements bound twice to the same shape

* Fix binding for rectangles

* Bind both ends at the end of the linear element creation, needed for focus points

* wip

* Refactor: Renames and reshapes for next commit

* Calculate and store focus points and gaps, but dont use them yet

* Focus points for rectangles

* Dont blow up when canceling linear element

* Stop suggesting binding when a non-compatible tool is selected

* Clean up collision code

* Using Geometric Algebra for hit tests

* Correct binding for all shapes

* Constant gap around polygon corners

* Fix rotation handling

* Generalize update and fix hit test for rotated elements

* Handle rotation realtime

* Handle scaling

* Remove vibration when moving bound and binding element together

* Handle simultenous scaling

* Allow binding and unbinding when editing linear elements

* Dont delete binding when the end point wasnt touched

* Bind on enter/escape when editing

* Support multiple suggested bindable elements in preparation for supporting linear elements dragging

* Update binding when moving linear elements

* Update binding when resizing linear elements

* Dont re-render UI on binding hints

* Update both ends when one is moved

* Use distance instead of focus point for binding

* Complicated approach for posterity, ignore this commit

* Revert the complicated approach

* Better focus point strategy, working for all shapes

* Update snapshots

* Dont break binding gap when mirroring shape

* Dont break binding gap when grid mode pushes it inside

* Dont bind draw elements

* Support alt duplication

* Fix alt duplication to

* Support cmd+D duplication

* All copy mechanisms are supported

* Allow binding shapes to arrows, having arrows created first

* Prevent arrows from disappearing for ellipses

* Better binding suggestion highlight for shapes

* Dont suggest second binding for simple elements when editing or moving them

* Dont steal already bound linear elements when moving shapes

* Fix highlighting diamonds and more precisely highlight other shapes

* Highlight linear element edges for binding

* Highlight text binding too

* Handle deletion

* Dont suggest second binding for simple linear elements when creating them

* Dont highlight bound element during creation

* Fix binding for rotated linear elements

* Fix collision check for ellipses

* Dont show suggested bindings for selected pairs

* Bind multi-point linear elements when the tool is switched - important for mobile

* Handle unbinding one of two bound edges correctly

* Rename boundElement in state to startBoundElement

* Dont double account for zoom when rendering binding highlight

* Fix rendering of edited linear element point handles

* Suggest binding when adding new point to a linear element

* Bind when adding a new point to a linear element and dont unbind when moving middle elements

* Handle deleting points

* Add cmd modifier key to disable binding

* Use state for enabling binding, fix not binding for linear elements during creation

* Drop support for binding lines, only arrows are bindable

* Reset binding mode on blur

* Fix not binding lines
5 years ago
wasp77 5f195694ee
update simplifier distance to reflect zoom (#2004)
* update simplifier distance to reflect zoom

The distance used in the iterative end-point fit algorithm to
determine if points can be removed no longer ignores the
zoom. As the zoom gets larger this distance will get smaller
and fewer points will be removed, thus making for finer grain
control over the drawing. As the zoom gets smaller the drawing
will get more coarse as more points are removed.

* remove the comment

Co-authored-by: John Dupuis <wasp7@Johns-MacBook-Pro.local>
Co-authored-by: Michal Srb <xixixao@seznam.cz>
5 years ago
Rene 403e8bd307
clear selection from copied/duplicatated group (#1973)
Co-authored-by: rene_mbp <harryloveslearning@googlemail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar c06988a202
do not prevent UI scrolling on mobile (#2007) 5 years ago
David Luzar fea257765d
regenerate seed on change of sloppiness (#1986) 5 years ago
Daishi Kato 818821c293
feat: grid mode for line editing (#1984) 5 years ago
David Luzar c171fb4c7f
simplify by replacing draggingElementPointIndex with isDragging (#1982)
* simplify by replacing draggingElementPointIndex with isDragging

* add tsdoc
5 years ago
Aakansha Doshi 20500b7822
remove shared global scene and attach it to every instance (#1706)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis 54f8d8f820
New Crowdin updates (#1949) 5 years ago
David Luzar ab980b252c
make restore migration types required (#1977) 5 years ago
Christopher Chedeau 925db9dcca
Only insert text on double click when selection is enabled (#1937)
This was an oversight to enable it for all the shapes. I don't believe that we want to be able to insert text on double click when drawing a rectangle for example. And it's definitely a broken experience when doing so for free draw.

Fixes part of #1935
5 years ago
Mohammed Salman ee8fa6aaad
Import and export library from/to a file (#1940)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Aakansha Doshi 7eff6893c5
calculate coords based on container viewport position (#1955)
* feat: calculate coords based on parent left and top so it renders correctly in host App

* fix text

* move offsets to state & fix bugs

* fix text jumping

* account for zoom in textWysiwyg & undo incorrect offsetting

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar f295550940
ensure editingLinearElement handles are rendered on top (#1967) 5 years ago
Farooq AR df4e903bd6
Add regression tests for context-menu actions (#1959) 5 years ago
Daishi Kato a2e7d8d560
feat: rotating multiple elements (#1960) 5 years ago
Rene ebf2923c5e
Issues/1827 group-ungroup icons (#1956)
* show group and ungroup action-icon

* change group-icon visiblilty

don't show group if selected is only a single element or a single group of elements

Co-authored-by: rene_mbp <harryloveslearning@googlemail.com>
5 years ago
Thomas Steiner 880cac2359
Update browser-nativefs (#1963)
Incorporates the latest changes in the Native File System API
5 years ago
Thomas Steiner d3a38202e3
Make sure extension gets set correctly for exports (#1962) 5 years ago
David Luzar dc1f6c4d4c
change selection/line/draw shortcut defaults (#1953) 5 years ago
David Luzar c5d37a07c8
fix resize hints not showing due to LayerUI bailing on updates (#1952) 5 years ago
Lipis f15d62aa44
New Crowdin updates (#1926)
* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (Turkish)

* Auto commit: Calculate translation coverage

* New translations en.json (Arabic)

* New translations en.json (Turkish)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
5 years ago
David Luzar b07aa6e205
delay scene init until document active (#1920)
* delay scene init until document active

* use opts.once for the listener
5 years ago
Mohammed Salman cf36cb394b
Library improvements (#1925)
Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Herb Caudill 29f803e25d
Fix display of some emoji on Windows (#1933) 5 years ago
David Luzar c1488fa353
try/catch localStorage access (#1932) 5 years ago
David Luzar 494b7d08c5
mute FS abort errors (#1929) 5 years ago
David Luzar 4cfc8bd4b3
fix accessing nonexisting config property during appState clearing (#1928) 5 years ago
Mohammed Salman bac20fa641
Choosing color before entering text does not update the swatch (Fixes #1897) (#1915)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis 8ab7921796
New Crowdin updates (#1883)
* New translations en.json (Norwegian Bokmal)

* Auto commit: Calculate translation coverage

* New translations en.json (Hindi)

* Auto commit: Calculate translation coverage

* New translations en.json (Hindi)

* Auto commit: Calculate translation coverage

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Ukrainian)

* New translations en.json (Persian)

* New translations en.json (Albanian)

* New translations en.json (Catalan)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Norwegian Nynorsk)

* Auto commit: Calculate translation coverage

* New translations en.json (Norwegian Bokmal)

* Auto commit: Calculate translation coverage

* New translations en.json (Portuguese)

* Auto commit: Calculate translation coverage

* New translations en.json (Persian)

* Auto commit: Calculate translation coverage

* New translations en.json (Chinese Traditional)

* Auto commit: Calculate translation coverage

* New translations en.json (Finnish)

* Auto commit: Calculate translation coverage

* New translations en.json (Hindi)

* Auto commit: Calculate translation coverage

* New translations en.json (German)

* New translations en.json (German)

* Auto commit: Calculate translation coverage

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Ukrainian)

* New translations en.json (Persian)

* New translations en.json (Albanian)

* New translations en.json (Catalan)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Norwegian Nynorsk)

* Auto commit: Calculate translation coverage

* New translations en.json (Chinese Traditional)

* Auto commit: Calculate translation coverage

* New translations en.json (Norwegian Bokmal)

* Auto commit: Calculate translation coverage

* New translations en.json (Ukrainian)

* Auto commit: Calculate translation coverage

* New translations en.json (Finnish)

* Auto commit: Calculate translation coverage

* New translations en.json (German)

* Auto commit: Calculate translation coverage

* New translations en.json (Catalan)

* Auto commit: Calculate translation coverage

* New translations en.json (Catalan)

* Auto commit: Calculate translation coverage

* New translations en.json (Spanish)

* New translations en.json (Catalan)

* Auto commit: Calculate translation coverage

* New translations en.json (French)

* New translations en.json (Spanish)

* New translations en.json (Italian)

* New translations en.json (Portuguese)

* Auto commit: Calculate translation coverage

* New translations en.json (Italian)

* Auto commit: Calculate translation coverage

* New translations en.json (Russian)

* New translations en.json (Russian)

* Auto commit: Calculate translation coverage

Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
5 years ago
Aakansha Doshi 953cd5563c
move the excalidraw props to correct file and typo fix (#1907) 5 years ago
David Luzar 0ee2c15929
make clearing state for storage more type-safe (#1884) 5 years ago
Pete Hunt 6428b59ccb
Library MVP (#1787)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar 7ab0c1aba8
reload scene on hashchange (#1893)
* reload scene on hashchange

* tweak isLoading
5 years ago
Michal Srb 4ab4fce998
Refactoring in pointer down event handler, step 3 (#1888)
* Refactor: use pointer down state for alt duplication flag

* Refactor: use pointer down state for drag state

* Refactor: simplify over scrollbars check

* Refactor: move pointer move handler out of pointer down handler

* Refactor: move pointer up handler out of pointer down handler

* Refactor: further simplify scrollbar check state in pointer down event

* Refactor: pull out initial pointer down state creation
5 years ago
David Luzar 6e357c0291
fix deleting multi-point elem during edit (#1892) 5 years ago
Rene 51a8ab65f3
Group / ungroup should not always be present in the context menu (#1890)
Co-authored-by: rene_mbp <harryloveslearning@googlemail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Michal Srb 5664de0459
Refactoring in pointer down event handler, step 2 (#1887)
* Refactor: introduce pointer down state to replace implicit closure state with an explicit object

* Refactor: use pointer down state for resize handle

* Refactor: use pointer down state for isResizing

* Refactor: use pointer down state for resizing offset

* Refactor: use pointer down state for hit element

* Refactor: move selection handling out of pointer down event handler

* Refactor: move text handling out of pointer down event handler

* Refactor: move linear tools handling out of pointer down event handler

* Refactor: move element creation out of pointer down handler
5 years ago
Daishi Kato 6cc6e13892
adjust font baseline on resize (#1820)
* adjust font baseline on resize

* simplify font scaling on resize

* fix: resizing text to avoid glitchy behavior

* make text resizing deterministic

* no TEXT_WIDTH_PADDING hack

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Michal Srb 5d7020cce6
Refactoring in pointer down event handler (#1880)
* Refactor: Move context menu touch device handling

* Refactor: Move more stuff out of pointer down

* Refactor: Move last coords into an object

* Refactor: Move scrollbar handling out of pointer down

* Refactor: simplify resizing in pointer down

* Refactor: further simplify resizing in pointer down

* Refactor: clarify clearing selection code

* Refactor: move out clearing selection from pointer down

* Refactor: further simplify deselection in pointer down
5 years ago
David Luzar d5e7d08586
prompt when loading external scene before overriding local one (#1862) 5 years ago
fujimoto kyosuke 6f13b5ac75
Fix status when do `selectAll` while editing lines (#1828) 5 years ago
David Luzar df5eb3f0d9
change copy/paste styles shortcuts (#1881)
* change copy/paste styles shortcuts

* use keyCode
5 years ago
Aakansha Doshi 01e546c230
use width,height from current appstate when initializing scene (#1882)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis ead58bf2d9
New Crowdin updates (#1856) 5 years ago
Aakansha Doshi 9351b2821c
feat: add width, height as props to App.tsx (#1871) 5 years ago
David Luzar b1261eea70
duplicate point on cmd+d (#1831) 5 years ago
Oren Me 84abda82d5
docs: add multiple selection docs (#1875) 5 years ago
Mehedi Hassan cc52ea4ac2
Add support for long press to context menu on iOS (#1769)
* Initial support for touch context menu

* Only deal with touch if it's available

* Fix touch checking

* Remove touch checking

* Added comments

* Combine onTouch with onPointer for mobile context menu support
5 years ago
Minh Nguyen 8621ddb6a2
Extract backend URLs into environment variables (#1772) (#1848) 5 years ago
Aakansha Doshi b21f723eee
use absolute positioning instead of fixed (#1860) 5 years ago
David Luzar d9e84b90ce
strip fragment (#1859) 5 years ago
Prashant Agarwal 79c3b846d7
Added Language support for Hindi in language selection dropdown (#1753)
* Added Language support for Hindi in language selection dropdown

* Update src/locales/hi-IN.json

* Update src/i18n.ts

Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Lipis d39d8e3cb1
New Crowdin updates (#1846) 5 years ago
Lipis 89cf826555
Change target branch of coverage and pretty print (#1850) 5 years ago
Kostas Bariotis 2a25480272
Expose Git SHA to window (#1847)
* expose git sha

* move to global.d.ts

* fix vercel domain
5 years ago
Kostas Bariotis 9a5ae05bbf Auto commit: Calculate translation coverage 5 years ago
Lipis 54a72b821a
New translations en.json (Greek) (#1845) 5 years ago
Kostas Bariotis 8c3549f336
Add script to calculate percentage of translation (#1826)
* add script to calculate percentage of translation

* test translation change

* change translation

* test

* change translation

* Calculate percentages of each translation file

* test

* Calculate percentages of each translation file

* change translation

* test

* test

* Calculate percentages of each translation file

* test

* Calculate percentages of each translation file

* fix workflow

* test

* test again

* Calculate percentages of each translation file

* Calculate percentages of each translation file

* test

* refactor

* change build logic

* fix types, move English first

* docs added

* test translation file

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* test

* Calculate percentages of each translation file

* let this be the final test please

* Calculate percentages of each translation file

* test

* test

* Test

* Calculate percentages of each translation file

* test

* Calculate percentages of each translation file

* test

* Calculate percentages of each translation file

* test

* Auto commit: Calculate translation coverage

* test

* test

* test

* test

* Auto commit: Calculate translation coverage

* test

* only on master

* test

* test

* Auto commit: Calculate translation coverage

* switch to master branch

Co-authored-by: i18n automation <runner@fv-az76.2iswp1o5zimezclxzdlwqia2gf.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az129.idlktykl4ure3gqe2lnji05orb.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az76.pjgcdo5npjpenpqz2nk0ztqvxd.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az33.senarqq4ucbulg04aytwntvgah.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az51.icvemaqob4xunfekbtdiz2tu2c.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az78.gikxu4m3dpiulftj3bftpuu3ee.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az121.cqdewbghluceforu5pkvpnveec.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az139.jsbds1i2htye3fh1bzwbe4ugmf.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az50.0bg2cysi0dkefjvuua0a0kbd1h.cx.internal.cloudapp.net>
Co-authored-by: i18n automation <runner@fv-az51.nhi3in4tbx4ehjtltcwuwbwsua.cx.internal.cloudapp.net>
5 years ago
Simon Riisnæs Dagfinrud e23f7d37b6
Update Norwegian languages in list (#1843) 5 years ago
Lipis 483796f6ff
New Crowdin updates (#1813) 5 years ago
Minh Nguyen a679ef7876
Refactor CJS require to ESM (#1841)
Resolves https://github.com/excalidraw/excalidraw/pull/1793#discussion_r447067827
5 years ago
Kostas Bariotis 0a3fb70ec7
Dynamicaly import locales (#1793)
* dynamicly import locales

* fix tests

* reformat languages
5 years ago
Lipis 5970bb7ee9
Remove duplicate string for toggle grid mode (#1821) 5 years ago
Saransh Barua 1991511ef7
Fix flickering outline on the dialogs while clicking (#1747) 5 years ago
David Luzar cd87bd6901
do not center text when not applicable (#1783) 5 years ago
Daishi Kato 9c89504b6f
fix: start dragging grouped elements (#1818)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Daishi Kato caa9b54893
do not render grid on export (#1814) 5 years ago
Lipis e7ef02cc0f
New Crowdin updates and change code for Norwegian Bokmal (#1776)
* New translations en.json (Turkish)

* New translations en.json (French)

* New translations en.json (Turkish)

* New translations en.json (Turkish)

* New translations en.json (Turkish)

* New translations en.json (Turkish)

* New translations en.json (Turkish)

* New translations en.json (Turkish)

* New translations en.json (Norwegian Bokmal)

* Update i18n.ts

* Remove no-NO

* Update i18n.ts

* Update i18n.ts

* New translations en.json (Hindi)

* New translations en.json (Hindi)

* New translations en.json (Hindi)

* New translations en.json (Hindi)

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Ukrainian)

* New translations en.json (Persian)

* New translations en.json (Albanian)

* New translations en.json (Catalan)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Chinese Traditional)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (Persian)

* New translations en.json (Portuguese)

* New translations en.json (Turkish)

* New translations en.json (Turkish)

* New translations en.json (Turkish)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Ukrainian)

* New translations en.json (Persian)

* New translations en.json (Albanian)

* New translations en.json (Catalan)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Polish)

* New translations en.json (Polish)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Portuguese)

* New translations en.json (Persian)

* New translations en.json (Finnish)

* New translations en.json (Hindi)

* New translations en.json (Ukrainian)

* New translations en.json (German)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Ukrainian)

* New translations en.json (Persian)

* New translations en.json (Albanian)

* New translations en.json (Catalan)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Norwegian Bokmal)

* New translations en.json (Finnish)

* New translations en.json (Portuguese)

* New translations en.json (Chinese Traditional)
5 years ago
Daishi Kato baa8fb6c14
grid support (1st iteration) (#1788)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Jed Fox b6bf011d0d
Inline the dropdown icon (#1782) 5 years ago
Daishi Kato 482fa2d90f
fix visibility check on rotated elements (#1799) 5 years ago
Kostas Bariotis a357d00bbe
Hint for shortcut for moving the visible area (#1784) 5 years ago
Kostas Bariotis bda8415714
Include stroke style when copy/paste styles (#1785) 5 years ago
Oliver Benns ca87ca6fe9
Add user list component + snap to user functionality (#1749) 5 years ago
Kostas Bariotis 8f65e37dac
Disable Sentry inside Docker (#1781) 5 years ago
Lipis 2eb58da4c3
New Crowdin translations (#1748)
* New translations en.json (Finnish)

* New translations en.json (French)

* New translations en.json (Portuguese)

* New translations en.json (Persian)

* New translations en.json (Albanian)

* New translations en.json (Catalan)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Polish)

* New translations en.json (Spanish)

* New translations en.json (Norwegian)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Ukrainian)

* New translations en.json (Italian)

* New translations en.json (Italian)

* New translations en.json (Persian)

* New translations en.json (Persian)

* New translations en.json (Persian)

* New translations en.json (German)

* New translations en.json (Portuguese)

* New translations en.json (Persian)

* New translations en.json (Persian)

* New translations en.json (Persian)

* New translations en.json (Persian)

* New translations en.json (Finnish)

* New translations en.json (Hindi)

* New translations en.json (Hindi)

* New translations en.json (Hindi)

* New translations en.json (French)

* New translations en.json (Greek)

* New translations en.json (Greek)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Traditional)
5 years ago
Thomas Steiner 3cee0768cc
Null file handle doesn’t need to be passed (#1752)
* Bump browser-nativefs version to v0.2.0

In reply to https://github.com/tomayac/browser-nativefs/issues/2.

* Update package-lock.json

* Null file handle doesn’t need to be passed
5 years ago
Thomas Steiner 5d3867d8ac
Implement Save without re-prompt and Save as (#1709)
* Implement Save without re-prompt and Save as
Fixes #1668

* Add save-as icon

* Make .excalidraw the default extension

* Only show save as button on supporting browsers
5 years ago
Lipis 0ed6a96b6a
New Crowdin translations (#1724) 5 years ago
David Luzar dadf054ea2
fix not always generating shape on render (#1741) 5 years ago
Thomas Steiner 6b87278a0f
Add file handling (#1736)
* Add file handling
https://github.com/WICG/file-handling/blob/master/explainer.md#example

* Only trigger on `.excalidraw` for now
5 years ago
Saransh Barua 998f0ae458
remove z-index for color-picker-hash div (#1711) 5 years ago
Aakansha Doshi 60973f6dc5
rename container class to excalidraw and move css from index.html to app.css (#1729)
Moved the css from index.html to app.css so it can be included in upstream app as well
5 years ago
Daishi Kato 53ab46126d
support resizing multiple elements including texts (#1726)
Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Youness Fkhach d171e9705d
Fix RTL text direction rendering (reopened) (#1722)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Pete Hunt f7c4efbd35
Excalicharts MVP (#1723)
Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
David Luzar d1be2a5481
fix text constructor groupIds & improve type safety (#1715) 5 years ago
fujimoto kyosuke 476c0e9f8a
Fix undo with line editing (#1717) 5 years ago
Lipis c6e73c56fd
New Crowdin translations (#1703) 5 years ago
Farooq AR 669e84b5d7
Add regression tests for context-menu (#1683) (#1697)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar ff93d95998
Revert "Fix RTL text direction rendering (#1687)" (#1705)
This reverts commit a118bed82f.
5 years ago
Youness Fkhach a118bed82f
Fix RTL text direction rendering (#1687)
Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Steven Nguyen fd75b88bd3
Double finger zoom should not select things (#1333) 5 years ago
Lipis 1e9adf0a80
New Crowdin translations (#1700) 5 years ago
Lipis 3f31a6ce89
New Crowdin translations (#1696) 5 years ago
Lipis d3d9994c74
New Crowdin translations (#1690)
* New translations en.json (Persian)

* New translations en.json (Persian)

* New translations en.json (Persian)

* New translations en.json (French)

* New translations en.json (Portuguese)

* New translations en.json (Persian)

* New translations en.json (Albanian)

* New translations en.json (Catalan)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Polish)

* New translations en.json (Spanish)

* New translations en.json (Norwegian)

* New translations en.json (Dutch)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Ukrainian)

* New translations en.json (French)
5 years ago
David Luzar 14a66956d7
Implement line editing (#1616)
* implement line editing

* line editing with rotation

* ensure adding new points is disabled on point dragging

* fix hotkey replacement

* don't paint bounding box when creating new multipoint

* tweak points style, account for zoom and z-index

* don't persist editingLinearElement to localStorage

* don't mutate on noop points updates

* account for rotation when adding new point

* ensure clicking on points doesn't deselect element

* tweak history handling around editingline element

* update snapshots

* refactor pointerMove handling

* factor out point dragging

* factor out pointerDown

* improve positioning with rotation

* revert to use roughjs for calculating points bounds

* migrate from storing editingLinearElement.element to id

* make GlobalScene.getElement into O(1)

* use Alt for adding new points

* fix adding and deleting a point with rotation

* disable resize handlers & bounding box on line edit

Co-authored-by: daishi <daishi@axlight.com>
5 years ago
Lipis db316f32e0
New Crowdin translations (#1659) 5 years ago
Youness Fkhach 9151da772c
feat: hide the UI elements when printing the page (#1680) 5 years ago
David Luzar f413bab3de
Fix group element removing (#1676) 5 years ago
Aakansha Doshi 17e9cc4506
Some cleanup in App.tsx (#1681) 5 years ago
Aakansha Doshi fa359034c5
scroll the closest element to center (#1670)
Co-authored-by: Sanghyeon Lee <yongdamsh@gmail.com>
5 years ago
David Luzar 0db7ac78c4
fix fontFamily state updating (#1679) 5 years ago
David Luzar 44a88d2d58
Rewrite restore to guard against missing migrations (#1664) 5 years ago
Pete Hunt 56f8bc092d
Tests for groups, more test utils (#1669) 5 years ago
David Luzar 4f3bf79708
skip element mutation on noop updates (#1667) 5 years ago
Daishi Kato 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>
5 years ago
David Luzar 5327e8a3dc
fix language change not rerendering ui (#1638) 5 years ago
David Luzar 63c10743fb
split font into fontSize and fontFamily (#1635) 5 years ago
Pete Hunt 46b574283f
Fix zindex in groups (#1660) 5 years ago
Pete Hunt 61e5b66dac
Group/ungroup (#1648)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Aakansha Doshi 5252726307
dynamically import socket.io-client when needed (#1631) 5 years ago
Lipis 1a1cbb345b
New Crowdin translations (#1617) 5 years ago
David Luzar 35049e3de7
History tweaks (#1641)
Co-authored-by: Pete Hunt <phunt@twitter.com>
5 years ago
Timur Khazamov d315e3dc4d
Update TypeScript to 3.9.3 (#1640)
Co-authored-by: tk338g <tkhazamov@wayfair.com>
5 years ago
Pete Hunt 6512ede9ca
Optimize undo history (#1632)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Daishi Kato 51608c07b0
15-degree rotation locking (#1627) 5 years ago
David Luzar d2ae18995c
add history.shouldCreateEntry resolver (#1622) 5 years ago
David Luzar ce6f2ff88c
cache nonDeleted elements (#1626) 5 years ago
Preet 584e4182a7
Ensure arrows are not draggable from inside (#1620) 5 years ago
Lipis c427aa3cce
Prefer arrow functions and callbacks (#1210) 5 years ago
Richard Keenan 33fe223b5d
Typo fix in desc_exitSession en.json (#1619) 5 years ago
Daishi Kato 4d2e8f9ad1
feat: resize multiple elements including two-point lines (#1607) 5 years ago
Daishi Kato 6b628bb1a6
fix: resize non solid lines/arrows/draws (#1608) 5 years ago
Kostas Bariotis 7f35b805d1
Add Catalan translation (#1566) 5 years ago
Lipis 755cd9c320
New Crowdin translations (#1567)
* New translations en.json (Greek)

* New translations en.json (Norwegian)

* New translations en.json (Russian)

* New translations en.json (Russian)

* New translations en.json (Russian)

* New translations en.json (Catalan)

* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (Norwegian)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Spanish)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Catalan)

* New translations en.json (Spanish)

* New translations en.json (Portuguese)

* New translations en.json (Norwegian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (German)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (French)

* New translations en.json (Norwegian)

* New translations en.json (Hebrew)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Spanish)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Catalan)

* New translations en.json (French)

* New translations en.json (Spanish)

* New translations en.json (Greek)

* New translations en.json (French)

* New translations en.json (Norwegian)

* New translations en.json (Hebrew)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Spanish)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Spanish)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (German)

* New translations en.json (Catalan)

* New translations en.json (Catalan)

* New translations en.json (Spanish)

* New translations en.json (Catalan)

* New translations en.json (Catalan)

* New translations en.json (Catalan)

* New translations en.json (Catalan)

* New translations en.json (French)

* New translations en.json (Italian)

* New translations en.json (Portuguese)

* New translations en.json (Italian)
5 years ago
fujimoto kyosuke afbfe2b8b1
Alt should be labeled as Option on Mac (#1602) 5 years ago
Yuval Ashkenazi 9bd72f91fc
fixed typo: loose ==> lose (#1601) 5 years ago
David Luzar 876170ee27
fix snapshots (#1598) 5 years ago
David Luzar 39c56a4c01
implement stroke style (#1571) 5 years ago
Daishi Kato f6be200388
feat: resize multiple curved lines (#1596) 5 years ago
David Luzar 828c9c4d65
use commitToHistory prop for handling draw history (#1595) 5 years ago
fujimoto kyosuke c32640d174
Fix free draw to allow undo (#1594) 5 years ago
Thomas Steiner ad81033a78
Prompt for reload when new service worker is available (#1588) 5 years ago
Simonboeuf1 ece631b430
preserve spaces in text blocks in svg export (#1587) 5 years ago
Kostas Bariotis 9ec43d2626
Add free draw mode (#1570) 5 years ago
David Luzar a90ca5eb84
don't use unicode characters for shortcut help (#1565)
* don't use unicode characters for shortcut help

* use option instead of alt

* make shortcut replacement case-insensitive

* improve shortcut dialog layout
5 years ago
Daishi Kato 394237728f
Refactor: resize two-point lines/arrows (#1568) 5 years ago
Lipis cdb483b895
New Crowdin translations (#1551)
* New translations en.json (Spanish)

* New translations en.json (Japanese)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Norwegian)

* New translations en.json (Hindi)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Dutch)

* New translations en.json (Spanish)

* New translations en.json (Korean)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Hebrew)

* New translations en.json (Finnish)

* New translations en.json (Spanish)

* New translations en.json (Portuguese)

* New translations en.json (German)

* New translations en.json (Dutch)
5 years ago
Herb Caudill 48264d1be0
Room dialog: Change 'Name' to 'Your name' (#1562)
* Change label 'Name' to 'Your name'

* add yourName as duplicate of Name in all locales
5 years ago
Aakansha Doshi 5b80ad045b
show reset icon with zoom percentage during zen mode (#1540) 5 years ago
Daishi Kato 3b1d6910aa
fix resizing: dynamic pointer offset for better UX (#1560) 5 years ago
David Luzar 8c8458ceb0
fix incorrect font rendered on late load (#1555) 5 years ago
Pete Hunt 4696c9ee0e
Syncing optimizations (#1554)
* Syncing optimizations

* Add comment
5 years ago
Justin Greenberg e27f3f9ad2
fix(data): removes unnecessary await (#1549) 5 years ago
Lipis 028f9b4b88
New Crowdin translations (#1508) 5 years ago
Daishi Kato 73d8c5b7c1
fix resizing lines with abs coords bigger than element w/h (#1427) 5 years ago
Ion Rosgrim 686af31d9d
on rtl languages the language dropdown is not visible (#1526) 5 years ago
Esteban 7522c48453
Make tools shortcuts case insensitive (#1532) (#1533) 5 years ago
Ion Rosgrim dd7aa29297
#1529 Rtl ui broken in zen mode (#1530) 5 years ago
David Luzar 4aa1784ba3
fix horizontal scroll via shift+wheel on mac (#1528) 5 years ago
David Luzar b7a37c157b
scroll horizontally on shift-scroll (#1519) 5 years ago
David Luzar 51f8146357
disable pointer events on hidden menus in zen mode (#1511) 5 years ago
Aakansha Doshi 0c2aa951d6
refactor toolbutton.tsx - add default props (#1492) 5 years ago
Kent Beck dd1dfc5950
One more socket listener moved to Portal (#1507)
* room-user-change listener moved to Portal

* Eliminate useless checks

* Update src/components/App.tsx

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

Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Lipis 77f76a263b
New Crowdin translations (#1494)
* New translations en.json (German)

* New translations en.json (Finnish)

* New translations en.json (Indonesian)

* New translations en.json (Hebrew)

* New translations en.json (Japanese)
5 years ago
Kent Beck 0baabff41b
Begin moving socket listeners to Portal (#1504) 5 years ago
Daishi Kato da1031aeb4
Fix resize logic (partly) (#1475) 5 years ago
Lipis 4824f9e1d4
New Crowdin translations (#1491) 5 years ago
Lipis 5855fcf946
New Crowdin translations (#1490)
* New translations en.json (French)

* New translations en.json (Hebrew)

* New translations en.json (Hebrew)

* New translations en.json (Hebrew)

* New translations en.json (Hebrew)

* New translations en.json (Hebrew)
5 years ago
Lipis 9cd2b78d79
New Crowdin translations (#1471)
* New translations en.json (Norwegian)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Korean)

* New translations en.json (Spanish)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Dutch)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Italian)

* New translations en.json (Finnish)

* New translations en.json (German)

* New translations en.json (Finnish)

* New translations en.json (Norwegian)

* New translations en.json (Polish)

* New translations en.json (Portuguese)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Korean)

* New translations en.json (Spanish)

* New translations en.json (Japanese)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Finnish)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Bulgarian)

* New translations en.json (Arabic)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (Norwegian)

* New translations en.json (Hebrew)

* New translations en.json (Hebrew)

* New translations en.json (Hebrew)

* Add Hebrew to dropdown

Co-authored-by: Jed Fox <git@twopointzero.us>
5 years ago
Faustino Kialungila 582d26e858
fix tool icon button on mobile (#1489) 5 years ago
David Luzar 2c5c770e78
rewrite picker color handling (#1487) 5 years ago
David Luzar a4b49ea350
ignore fileOpen error when user cancels (#1486) 5 years ago
Aakansha Doshi 1866074c07
Add Zen mode for distraction free drawing (#1450) 5 years ago
Warren Seine 71e7f130bc
Generalize color normalization (#1479) (#1483)
Following #1478, a bug was found related to transparent backgrounds. As Excalidraw only supports `transparent` as a valid transparent color, this commits generalizes the use of canvas to normalize color values.

It changes a few details:
- `rgba()` or `hsla()` syntaxes are not accepted anymore
- pasting values goes through the same normalization step, avoiding invalid values
- color validation is not regex-based anymore
- any CSS-valid black color is now accepted (e.g. previously, `rgb(0,0,0)` was rejected)
5 years ago
Warren Seine fa8354e306
Support different color inputs (#1478) (#1479) 5 years ago
Lipis fc802c758f
Update shield's tooltip (#1466) 5 years ago
José Quinto 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>
5 years ago
Daishi Kato 8c49770e3b
Better resize cursors on rotated elements (#1470)
* better resize cursor on rotated elements

* refactor with Math.round
5 years ago
Jed Fox d7729d295a
RTL for the security badge, add an arrow to the tooltip (#1469)
* FIx RTL on the encryption shield

* Add an arrow to the tooltip
5 years ago
Lipis d1086f3624
New Crowdin translations (#1452) 5 years ago
Preet 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
5 years ago
Ed Bentley 9b7a743e8b
Fix bug: Undo multi element (#1461)
* Add failing test

* Fix multi element undo

* Update snapshots
5 years ago
Ed Bentley 5822117e23
Add optional watermark on export (#1365)
* Add optional watermark on export

* Address init PR feedback

* Add SVG export with refactoring

* Update export.ts

* Move addWatermark to appState

* Update snapshots

* Fit watermark in small scene

* Rename watermark things

Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Lipis 13cea081f3
New Crowdin translations (#1449)
* New translations en.json (Arabic)

* New translations en.json (Korean)

* New translations en.json (Bulgarian)

* New translations en.json (Turkish)

* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Italian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Indonesian)

* New translations en.json (Hungarian)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Traditional)

* New translations en.json (Japanese)

* New translations en.json (Dutch)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Arabic)

* New translations en.json (Korean)

* New translations en.json (Bulgarian)

* New translations en.json (Turkish)

* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Italian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Indonesian)

* New translations en.json (Hungarian)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Traditional)

* New translations en.json (Japanese)

* New translations en.json (Norwegian)

* New translations en.json (Italian)

* New translations en.json (Italian)

* New translations en.json (German)
5 years ago
fujimoto kyosuke 38c7d5a7bf
Reflect `textAlign` when pasting a style (#1378)
* Reflect `textAlign` when pasting a style

* Re-run Actions
5 years ago
Steven Nguyen 2bfb0c20c3
Add a button to show all content, if the zoom allows it. (#1406)
* add zoom center action button

* enhance zoom calculation and scroll to center

* add zoom out and center button

* filter deleted elements

* improve complexity

* add key shortcut

* calculate zoom value

* don't render zoomCenter action

* offset from top to account for shape menu

* change shortcut & add to shortcut dialog

* decrease offset

* revert offset

* change hotkey & description

* rename to zoomToFit

* change shortcut label & position

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Aakansha Doshi ff0ecb5e33
add always visible lock icon on top right to show info about e… (#1403)
* improvement(layerui.js): add lock icon on top right to show encrypted info about excalidraw

fixes https://github.com/excalidraw/excalidraw/issues/1313

* swap lock with shield

* fix dimensions

* make link open in new tab

* add newline between toolip text and link

* increase tooltip line-height

* remove unused GitHubCorner compo

* reposition; reintroduce GH icon

* make shield into link

* make tooltip not show when drawing

* Review fix

* remove link from tooltip

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Aakansha Doshi a18342b5b5
Refactor LayerUI (#1434)
* chore(gitignore): add .idea to gitignore

* refactor(layerui): pass named function to react.memo so that in dev tools the name shows up

This makes debugging easier as well

* refactor(layerui): break the functional component into multiple render methods
5 years ago
Lipis 9131813661
New Crowdin translations (#1430)
* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (German)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Traditional)

* New translations en.json (Dutch)
5 years ago
David Luzar 83199164ae
don't prevent select-element devTools action (#1446) 5 years ago
Mohit kumar Bajoria 519a9ca493
Close sharing dialog on Enter when changing the username (#1437) 5 years ago
David Luzar 8cfc64a3ab
fix bg color picker rendered behind shape menu (#1445)
* fix bg color picker rendered behind shape menu

* add comment
5 years ago
Thomas Steiner c35d76cb4c
Use application/vnd.excalidraw+json and .excalidraw (#1440)
* Use application/vnd.excalidraw+json and .excalidraw

* UA sniff and use appication/json on mobile Safari
5 years ago
Thomas Steiner 9a59b7496e
Only load PWACompat when we really need it (#1439) 5 years ago
Thomas Steiner fe5e71a4e5
Add PWACompat (#1433)
* Add PWACompat (attempt)
Fixes #1425

* Fix CSS, use custom splash screen font

* Respect bottom safe area
5 years ago
David Luzar 75e0163dd1
tweak blurry bg for legibility & remove from modals (#1436) 5 years ago
Tom Hicks 3b357d8332
Improve UI continuity behind panels (#1435)
* Add variable for island color

* Make islands semi-transparent

This preserves the notion of the infinite canvas and helps
maintain context, especially on smaller screens.
5 years ago
Lipis 08e467f1a1
New Crowdin translations (#1416)
* New translations en.json (Portuguese)

* New translations en.json (Korean)

* New translations en.json (Russian)

* New translations en.json (German)
5 years ago
David Luzar d998a190df
persist pointerDown event (#1426) 5 years ago
dependabot-preview[bot] 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>
5 years ago
Daishi Kato e77e2255bd
Add test for getElementBounds (#1395)
* fix calc diamond bounds

* Add test for getElementBounds

* use toEqual
5 years ago
Faustino Kialungila 51ccf61cc6
Bring root fonts back (#1422)
* redirect font loading

* bring preloading back

* change paths

* add css type

* move fonts to root

* correct paths

* remove redirects

* correct ext

* remove fonts from main CSS

* remove unneeded fonts

Co-authored-by: kbariotis <konmpar@gmail.com>
5 years ago
Faustino Kialungila cca15b0640
Disable notifications (#1421)
* Remove notifications

* remove dead component
5 years ago
David Luzar 692ceece65
fix not using className when querying container (#1420) 5 years ago
Kostas Bariotis 0e94303791
Ignore `undefined is not an object (evaluating 'window.__pad.pe… (#1417) 5 years ago
Timur Khazamov 4228c2e094
[POC] use serviceWorker from create-react-app (#1286)
* Service worker with toast notifications

* Update CSP to allow fetches from now.sh

* Fixed clearing timers

* rounded icon for pwa (#1301)

* rounded icon for pwa

* cirle pwa app icon

* fix fonts caching

* fix app

* fix css import

* Updated csp tp inlcude worker-src: self

* add worker CSP rule

* use square icon

Co-authored-by: Timur Khazamov <t1mmaas@skbkontur.ru>
Co-authored-by: Faustino Kialungila <Faustino.kialungila@gmail.com>
Co-authored-by: kbariotis <konmpar@gmail.com>
5 years ago
Jérémie Pardou-Piquemal e158dbc45a
Prevent next paste on middle clic with linux (#1402) 5 years ago
Lipis 0ffbde77ac
New Crowdin translations Bulgarian (#1388) 5 years ago
David Luzar 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
5 years ago
Aakansha Doshi 227ff60909
refactor(app.tsx): move Portal to new file and some refactoring (#1398) 5 years ago
fujimoto kyosuke 6abcb2d87f
Suppresses unnecessary fill-rule attribute in SVG (#1397) 5 years ago
fujimoto kyosuke 8b805d436f
Fix fill of looping lines in exported SVG (#1396) 5 years ago
Daishi Kato 038cff8793
fix calc diamond bounds (#1394) 5 years ago
Aakansha Doshi e98fba38be
refactor(app.tsx): use constants instead of hard coded strings for better readablility (#1391)
don't use inline function as it will create a new refrence everytime
5 years ago
Roxana Chiorean d902bbd618
Fix flickering mouse tracking when using two touches on mobile (#1390) 5 years ago
Lipis 2b9ae38946
Alt drag to shortcuts for duplicate (#1389) 5 years ago
Kostas Bariotis 2adae4132b
Global username instead of per room (#1382)
* global username

* remove string interpolation

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

* remove string interpolation

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

* remove backwards compat

Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
fujimoto kyosuke 166ad0412c
Fix to reflect `textAlign` property to SVG export (#1375) 5 years ago
Kostas Bariotis 7b3816d0d3
Store username for every room (#1381)
* store username for every room

* add missing fun
5 years ago
Kostas Bariotis 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>
5 years ago
Lipis d2246bfb30
New Crowdin translations (#1380) 5 years ago
Lipis a3fd464702
New Crowdin translations (#1344)
* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Portuguese)

* New translations en.json (Italian)

* New translations en.json (Arabic)

* New translations en.json (Italian)

* New translations en.json (Turkish)

* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Korean)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Hungarian)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Traditional)

* New translations en.json (Bulgarian)

* New translations en.json (German)

* New translations en.json (Chinese Simplified)

* New translations en.json (Norwegian)

* New translations en.json (Spanish)

* New translations en.json (Greek)

* New translations en.json (Bulgarian)

* New translations en.json (Polish)

* New translations en.json (French)

* New translations en.json (Arabic)

* New translations en.json (Italian)

* New translations en.json (Turkish)

* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Korean)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Hungarian)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Traditional)

* New translations en.json (Bulgarian)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Norwegian)

* New translations en.json (Spanish)

* New translations en.json (Chinese Simplified)

* New translations en.json (German)

* New translations en.json (Indonesian)

* New translations en.json (Polish)
5 years ago
Tom Dohnal f3ef93e9ce
Allow to drag THEN press alt to duplicate (#1373)
* fix typo

* duplicate elements when alt is pressed on pointer move

* document use case

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Daishi Kato 5ca763cdbb
Calculate rotated element bounds properly (#1354)
* Calculate rotated element bounds properly, fixes #1303

* prefer isLinearElement

* empty commit
5 years ago
fujimoto kyosuke b971737d32
Restore textAlign property (#1374) 5 years ago
Jed Fox f7e3ee2064
Use open-color directly (#1371) 5 years ago
Jed Fox 8ce595e5d6
Add rule banning literal text in JSX (#1367) 5 years ago
Jed Fox 16a3aa7561
Fix mobile dialog styling (#1363) 5 years ago
Lipis f134211bf9
Ask for name instead of username (#1362) 5 years ago
Jed Fox 136b14cef5
Update shortcut display for enter on Mac (#1358) 5 years ago
Kostas Bariotis 0a284adc18
Allow opening empty excalidraw file (#1348)
* allow openning empty file

* correctly throw error

* fix error handling

* switch back to error objects

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis 70e7dd6e3b
Add more shortcuts and minor refactor (#1347) 5 years ago
Lipis d04eaf7040
New Crowdin translations (#1323) 5 years ago
Sanghyeon Lee 9761d7ea50
Refactor ResizeArrowFnType to resolve Codesandbox parsing error (#1338) 5 years ago
José Quinto 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>
5 years ago
Sanghyeon Lee bd32a26653
Move GitHub corner and visually-hidden class (#1336)
* Move visually-hidden class to index.html

* Replace github corner with component

* Momoize GitHubCorner

* Simplify component return
5 years ago
fujimoto kyosuke 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
5 years ago
Edwin Lin d5899f6ca0
Make the mouse location broadcast volatile (#1331) 5 years ago
Preet 57bbc9fe55
Fill a looped curve with the selected background color (#1315) 5 years ago
Dreace fe6f482e96
Optimize ShortcutsDialog style (#1329)
* Optimize ShortcutsDialog style

* Add word-break only to ShortcutKey
5 years ago
Youness Fkhach 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>
5 years ago
David Luzar 3fd6f3023f
support newline on shift+enter (#1324) 5 years ago
Kent Beck fdebb38bf6
Move more stuff to Portal (#1309) 5 years ago
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 years ago
Lipis c714c778ab
New Crowdin translations (#1319)
* New translations en.json (German)

* New translations en.json (Turkish)
5 years ago
Sanghyeon Lee 26facfa710
Fix 'Dialog' keydown event and prop type warning (#1305) 5 years ago
Lipis 020eebb663
New Crowdin translations (#1277) 5 years ago
Lipis 26fd2fe165
Better name for app state (#1300)
* Better name for app state

* Snapshot
5 years ago
Kent Beck 9a1af38c97
Begin extracting collaboration code to Portal (#1306) 5 years ago
Timur Khazamov ed378170b7
Use woff2 instead ttf (#1307)
* Use woff2 instead ttf

* Update font in svg-exported files to use woff2

Co-authored-by: Timur Khazamov <t1mmaas@skbkontur.ru>
5 years ago
Daishi Kato 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>
5 years ago
Lipis 03c22c1255
Switch to `Sentence case` instead of `Title Case` (#1279) 5 years ago
David Luzar 88cec2df5e
log console.error to sentry (#1243)
* log console.error to sentry

* fix
5 years ago
Lipis 5b684495ef
Translate click and change label (#1299) 5 years ago
Kostas Bariotis 67805bc7a7
Add collaborators names (#1223)
* add random usernames

* add username state

* add username input

* ability to set names

* fix tests

* set username oon mobile

* remove auto generated names

* remove commented code

* always string

* updaate snapshots

* maintain username when clearing canvas

* Update src/renderer/renderScene.ts

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

* add border

* fix styles

Co-authored-by: Pete Hunt <petehunt@users.noreply.github.com>
Co-authored-by: Faustino Kialungila <faustino.kialungila@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Lipis 0c3d34261e
Fixes in Shortcuts dialog and minor refactor (#1297) 5 years ago
Mohit kumar Bajoria e4c154f43e
Button for shortcuts (#1253) 5 years ago
Shriram Balaji 22160f50d3
Wrap localStorage API Access in try-catch (#1241) 5 years ago
Daishi Kato 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
5 years ago
Kostas Bariotis b60f5fcf06
Save on CTRL/CMD + S (#1287)
* save on shortcut

* revert keys files

* remove constant
5 years ago
David Luzar 729aeacc47
prevent pasting svg copied from excalidraw (#1288)
* prevent pasting svg copied from excalidraw

* remove unnecessary template
5 years ago
David Luzar e9b4700bba
edit text when clicked on with text tool (#1283) 5 years ago
David Luzar d3ed5a42fc
fix font being reset to current state font on edit (#1282) 5 years ago
Lipis 0c41f3e7aa
Add curved lines/arrows shortcuts (#1274) 5 years ago
Lipis 854af8aed2
New Crowdin translations (#1228)
* New translations en.json (Portuguese)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Arabic)

* New translations en.json (Italian)

* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Korean)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Hungarian)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Traditional)

* New translations en.json (Turkish)

* New translations en.json (Polish)

* New translations en.json (German)

* New translations en.json (Dutch)

* New translations en.json (French)

* New translations en.json (Korean)

* New translations en.json (Greek)

* New translations en.json (Polish)

* New translations en.json (Arabic)

* New translations en.json (Italian)

* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Korean)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Hungarian)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Traditional)

* New translations en.json (Turkish)

* New translations en.json (Arabic)

* New translations en.json (Italian)

* New translations en.json (Spanish)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Korean)

* New translations en.json (Indonesian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Hungarian)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (French)

* New translations en.json (Dutch)

* New translations en.json (Chinese Traditional)

* New translations en.json (Turkish)

* New translations en.json (Portuguese)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Norwegian)

* New translations en.json (Dutch)

* New translations en.json (Greek)

* New translations en.json (French)

* New translations en.json (Portuguese)
5 years ago
Lipis 60d9567e2d
Add Select All shortcut (#1270) 5 years ago
dependabot-preview[bot] 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>
5 years ago
Daishi Kato 4003fa24b2
fix #1254 (#1255) 5 years ago
Roxana Chiorean d5366db341
Adding ability to copy to clipboard as SVG (#1250) 5 years ago
Mohit kumar Bajoria 2de4fe29ad
Full Screen mode (#1212) 5 years ago
David Luzar 81b38d8808
fix wysiwyg event cleanup (#1248) 5 years ago
Shriram Balaji 290244660b
Restore selectedElements on undelete (#1242)
* Restore selectedElements on undelete

* Update regressionTest snapshots
5 years ago
Lipis 9a0889c698
Show shortcuts dialog when pressing `?` (#1224) 5 years ago
Lipis f6bf093fdd
New Crowdin translations (#1194)
* New translations en.json (Greek)

* New translations en.json (German)

* New translations en.json (Russian)

* New translations en.json (Norwegian)

* New translations en.json (Portuguese)

* New translations en.json (Spanish)

* New translations en.json (German)

* New translations en.json (Spanish)

* New translations en.json (Polish)
5 years ago
David Luzar 4dd947b261
fix scrollToCenter when no elements supplied (#1222)
* fix scrollToCenter when no elements supplied

* make getCommonBounds return default values on empty elements
5 years ago
Kostas Bariotis b97520400a
Broadcast mouse activity (#1175)
* broadcast mouse activity

* move to same MOUSE_LOCATION event

* remove key up handler

* update tests

* Fix border

* refactor

* rename activity to button

Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
5 years ago
David Luzar 23540eba4c
sync remote selection (#1207)
* sync remote selection

* skip deleted elements

* remove unnecessary condition & change naming
5 years ago
Faustino Kialungila adc099ed15
Refactor dnd event handler (#1221) 5 years ago
Faustino Kialungila d243f3901c
Insert text on double tap (#1217)
* Insert text on double tap(mobile)

* handleCanvasRef
5 years ago
José Quinto 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
5 years ago
Daishi Kato 44f871de71
do not select deleted elements (#1215) 5 years ago
Lipis ae1eee15cc
Replace ev -> event (#1209) 5 years ago
Lipis 31f76d59a2
Skip transparent background for cursor (#1208)
* Skip transparent background for cursor

* slice
5 years ago
David Luzar 3afb4515b6
scroll to content on collab scene init (#1201) 5 years ago
David Luzar 036978b837
fix font not rendered on init in FF (#1197) 5 years ago
Sanghyeon Lee 96cea9b84b
Make left panel height flexible to avoid overflow (#1169)
* Make overall left menu scrollable

* Make only mid-left panel scrollable

* Update src/styles.scss

* Update src/styles.scss

* Update src/components/LayerUI.tsx

* Remove unused class

* Move the scrolling role to Island

Co-authored-by: Lipis <lipiridis@gmail.com>
5 years ago
Adil HADDAOUI ae655cd7d3
Align ToolButton Label in RTL mode (#1186) 5 years ago
David Luzar 8030a167c6
make text committing cross-platform (#1188) 5 years ago
Lipis cd3083e8e6
New translations en.json (French) (#1190) 5 years ago
Lipis c1b067a8b9
New Crowdin translations (Dutch) (#1187)
* New translations en.json (Dutch)

* Update i18n.ts
5 years ago
alaoui abdellah 980d08ce56
Add support for committing a text entry on cmd/shift click (#1185) 5 years ago
Adil HADDAOUI b9b58d4464
Change arabic language name (#1184) 5 years ago
Lipis c240fff0c5
New Crowdin translations (mostly Arabic updates) (#1181) 5 years ago
David Luzar 4912a29e75
sync intermediate text updates (#1174)
* sync intermediate text updates

* fix initial render text position

* batch updates

* tweak onChange subscription
5 years ago
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>
5 years ago
Lipis 2be34effd4
New Crowdin translations (#1178)
* New translations en.json (Norwegian)

* New translations en.json (Norwegian)
5 years ago
Christopher Chedeau 27075b028c
Update zoom refresh (#1180)
One second feels way too long. Let's try 300ms
5 years ago
Christopher Chedeau 79557676c2
Revert "simulate a db tap on mobile to insert text (#1155)" (#1179)
This reverts commit 56034eacb0.
5 years ago
José Quinto efa8b95c52
fix scrollbar and toolbar grid-gap #1170 (#1173) 5 years ago
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)
5 years ago
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.
5 years ago
José Quinto 8fea75b84f
fix for #1106 - Weird behavior when resize + shift a 2-point li… (#1152)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
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>
5 years ago
Lipis 3e3ce18755
New translations en.json (Greek) (#1163) 5 years ago
Sanghyeon Lee 634410ad48
Modify action buttons visibility for desktop (#1156) 5 years ago
Lipis ffec3af635
New Crowdin translations (#1160)
* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (French)
5 years ago
Mohit kumar Bajoria 9b6700755a
Add new line on Enter (#1161)
* Add new line on Enter

Fixes #1158

* Fix lint
5 years ago
Faustino Kialungila 56034eacb0
simulate a db tap on mobile to insert text (#1155) 5 years ago
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)
5 years ago
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.
5 years ago
Lipis 1a47ff5c52
New Crowdin translations (#1145) 5 years ago
Lipis e2e4f3c805
New Crowdin translations (Greek) (#1118) 5 years ago
Brock Balducci 81d4f611a3
add action ui for deleting an element - #1125 (#1140) 5 years ago
Kostas Bariotis 4ecbbab7da
Add sentry integration (#1141) 5 years ago
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 ( c5d2fc7127/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
5 years ago
Sanghyeon Lee 763735ac84
Add `SCENE_INIT` broadcast type for new user (#1095) 5 years ago
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
5 years ago
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
5 years ago
Kent Beck 95eaadeb85
Refactor paste code (#1102) 5 years ago
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
5 years ago
Kent Beck aa54364bd6
Use existing helper to copy all state (#1098) 5 years ago
Lipis 2a373571f8
Change order of the fill options (#1097) 5 years ago
Lipis 90c83927ad
New Crowdin translations (#1089) 5 years ago
David Luzar cac2dda5ac
Add loading state (#1027)
* add loading state

* update snapshots

* add border radius

* fix comment breaking build jsx
5 years ago
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
5 years ago
David Luzar 6fd2a3b2e5
fix z-index action to account for deleted elems and add tests (#1077) 5 years ago
Lipis fb82715ef7
New Crowdin translations (#1085)
* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Traditional)
5 years ago
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
5 years ago
Marcel Kloubert 12d7550958
fixed generateCollaborationLink() (#1081) 5 years ago
Faustino Kialungila 4442addc02
Type action names (#1079)
* Type action names

* improve typing

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Lipis 9cc1037e7b
New Crowdin translations (#1076) 5 years ago
David Luzar 42df058223
load from localStorage only if not in multiplayer (#1074) 5 years ago
Sanghyeon Lee 104e48b6cb
Add the shape lock button for mobile (#1054) 5 years ago
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)
5 years ago
Pete Hunt bd7856adf3
Much more thorough tests! (#1053) 5 years ago
David Luzar cf4fa30a57
tweak png copy button label (#1062)
* tweak png copy button label

* fix lint
5 years ago
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 years ago
Lipis c7f10c5de2
New Crowdin translations (#1049)
* New translations en.json (German)

* New translations en.json (German)

* New translations en.json (German)
5 years ago
Jed Fox 8a6e2bf9cf
Use system fonts where possible. (#1050)
Also put Arial after Helvetica. I hate Arial.
5 years ago
Edwin Lin f1160a1534
load scene from localStorage in collaboration if user is first… (#1036)
* load scene from localStorage in collaboration if user is first in room

* load scene from localStorage in collaboration prior to syncing with server

* fix merge

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Kent Beck ba3cec8d0d
App mitosis begins (#1047) 5 years ago
Lipis 125d1294a0
New Crowdin translations (#1043) 5 years ago
Jed Fox daa121e909
Add a warning to encourage people to update translations direct… (#1045) 5 years ago
Lipis 5b6723b514
New Crowdin translations (#1037) 5 years ago
Kent Beck d3d25a128c
Extract helper for App context menu handling (#1033)
* Encapsulate SceneHistory. A little.

* Clean up TopErrorBoundary

* Extract helper for App context menu handling
5 years ago
Kent Beck 1e8cd2bd1c
Separated specification and implementation in TopErrorBoundary (#1031)
* Encapsulate SceneHistory. A little.

* Clean up TopErrorBoundary
5 years ago
David Luzar f6b36519f1
don't pass deleted elements to UI (#1029) 5 years ago
Kent Beck dc618ab122
Encapsulate SceneHistory. A little. (#1016) 5 years ago
Lipis 46e619d800
New Crowdin translations (#1020) 5 years ago
David Luzar edd54d93b3
revert #1017 (#1025)
This reverts commit 1546c00c0c.
5 years ago
Faustino Kialungila 0ad6f4ec6b
Remove deleted elements from svg export (#1021)
* Remove deleted elements from svg export

* skip deleted elements

* remove old comment

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Chang Yan 1546c00c0c
Fix adding incorrect dragging element when handleCanvasPointerD… (#1017) 5 years ago
Lipis 6b3dee6777
New Crowdin translations (#1011) 5 years ago