Commit Graph

1256 Commits (286642ffcf16a9c6962afb5d8132279db763e243)

Author SHA1 Message Date
David Luzar 3aab81bc35
docs: add tsdoc for certain element props (#2673)
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
4 years ago
Jed Fox 3b0fb1562d
feat: Require use of a preset dialog size; adjust dialog sizing (#2684) 4 years ago
Jed Fox 0488b7b5c6
fix(css): Fix compile error (#2685) 4 years ago
Jed Fox b8d13c98b5
refactor: Media queries (#2680) 4 years ago
Lipis 6f82a88b79
chore: Cleanup unused labels (#2682) 4 years ago
Lipis 022f349dc6
feat: Add line chart and paste dialog selection (#2670)
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Jed Fox <git@jedfox.com>
4 years ago
Harshil Parmar 8091ac6c08
style: media query for hiding shortcuts for mobile view (#2667)
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Luo bc414ccaaf
feat: tweak editing behavior (#2668)
* feat: tweak editing behavior

* fix tests

Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis e9cb7ee77c
chore: New Crowdin updates (#2620)
Co-authored-by: Kostas Bariotis <konmpar@gmail.com>
4 years ago
Lipis 86c036505b
chore: Remove unused cursorX, cursorY from AppState (#2665) 4 years ago
David Luzar 8dfea49ec1
improvement: change hint for 2-point lines on resize (#2655) 4 years ago
Lipis d7f314cda8
refactor: Remove duplicate entry from en.json (#2654) 4 years ago
Lipis 6adb45ef5a
feat: Change title to Excalidraw after a timeout (#2656)
* feat: Change title to Excalidraw after a timeout

* clear timeout
4 years ago
Lipis b0eeb8e6e6
refactor: Remove the word toggle from labels (#2648) 4 years ago
Rene 0faec7efb6
feat: Checkmark to toggle context-menu-items (#2645) 4 years ago
Rene aff817c667
align items in context menu (#2640) 4 years ago
Christopher Chedeau 9a3a3ecb44
fix: Center zoom on iPhone and iPad (#2642)
My last attempt removed the gesture handler altogether but broke macbooks. This one keeps it working on macbook but makes sure it zooms properly on iPhone and iPad.
4 years ago
Christopher Chedeau 81f8039ec7
fix: Don't break zoom when zooming in on UI (#2638)
If you start the gesture on the chrome, gesture is not defined and the zoom will be set to NaN and you will have to refresh.

Typescript was actually right and we shouldn't have overridden the bang ;)

Repro:
- On iPhone touch down on a shape, touch down on the chrome, start moving around
- See that the selection is off, but the zoom is not being modified like crazy.

https://user-images.githubusercontent.com/197597/102722206-6c182400-42b4-11eb-9865-6ae1cd0af9be.MP4
4 years ago
David Luzar b997e69ebc
improvement: Tweak error message on image import (#2619)
* improvement: tweak error message on image import

* tweak copy
4 years ago
dependabot[bot] 4a89aba682
chore(deps-dev): bump webpack in /src/packages/excalidraw (#2625)
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
David Luzar 34dcf998bd
docs: excalidraw package usage example tweaks (#2608)
Co-authored-by: Aakansha Doshi <monstershome@gmail.com>
4 years ago
Aakansha Doshi 325d1bec91
feat: Add onExportToBackend prop so host can handle it (#2612)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis b917e42694
fix: Consistent case for export locale strings (#2622) 4 years ago
Christopher Chedeau eb9e67e36a
improvement: Support numbers with commas in them (#2636) 4 years ago
dependabot[bot] f14ae52e94
chore(deps-dev): bump @babel/preset-env in /src/packages/excalidraw (#2624)
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
dependabot[bot] f93eb658d6
chore(deps-dev): bump webpack-bundle-analyzer (#2623)
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
Aakansha Doshi 9bac44ee75
fix(appstate.ts): Remove unnecessary console.error as it was polluting Sentry (#2637) 4 years ago
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) 4 years ago
David Luzar adb1ac5788
fix restoring appState (#2182) 4 years ago
Thomas Steiner b2822f3538
Make File Handling actually work (#2181)
Follow-up from #1736
4 years ago
Pete Hunt 68bdfaefbe
Fix pinch-to-zoom performance (#2171) 4 years ago
Lipis 2a2630082f
New Crowdin updates (#2166) 4 years ago
Pete Hunt e3f3427b31
Fix middle mouse panning on windows (#2172) 4 years ago
Lipis 7d7ce04e9b
Add Swedish to the picker 4 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>
4 years ago
João Forja 242ccac290
Arrows binds/unbinds to bindable elements when moved with arrow keys (Issue #2103) (#2150) 4 years ago
Robert van Hoesel c6736fa14e
Lock drag direction using `Shift` (#1858)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar d07099aadd
fix zindex to account for group boundaries (#2065) 4 years ago
Thomas Steiner 48c2a13c7a
Pass file extensions with leading dot after API change (#2149) 4 years ago
David Luzar aaddde5dd9
Fix history initialization (#2115) 4 years ago
Mohamed Saleh 9cac7816cc
Fix textbox element bindings on size changes (#2145)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 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