Commit Graph

821 Commits (4dfb0433318f129360d80ff66c682f90d807c0f2)

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
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