Commit Graph

771 Commits (bcf9cc2a5b07d40748063468c8a41a1ac4ee1ade)

Author SHA1 Message Date
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