68 Commits

Author SHA1 Message Date
Christopher Chedeau
6ca7420252
Remove warning about rooms not being persisted (#2199) 2020-10-04 13:02:06 -07:00
Pete Hunt
8ab9ffbe28
One-click installable libraries (#2179)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-01 19:12:43 +02:00
Lipis
643e6bd08d
feat: Add hint for double click to insert text (#2056) 2020-08-20 22:55:44 +03:00
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>
2020-08-14 17:59:43 +02:00
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
2020-08-14 13:27:41 +02:00
Michal Srb
c0dd870c6e
Dark mode (#2006)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-13 13:35:31 +02:00
Michal Srb
85d000ccda
Add prevent binding keyboard shortcut to shortcuts dialog (#2010)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-08-09 13:46:20 +02:00
Pete Hunt
6428b59ccb
Library MVP (#1787)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-07-10 11:20:23 +02:00
David Luzar
d5e7d08586
prompt when loading external scene before overriding local one (#1862) 2020-07-08 22:55:26 +02:00
David Luzar
b1261eea70
duplicate point on cmd+d (#1831) 2020-07-07 13:53:44 +02:00
Oren Me
84abda82d5
docs: add multiple selection docs (#1875) 2020-07-07 11:24:07 +02:00
Lipis
5970bb7ee9
Remove duplicate string for toggle grid mode (#1821) 2020-06-26 22:28:01 +02:00
Daishi Kato
baa8fb6c14
grid support (1st iteration) (#1788)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-06-23 17:24:52 +02:00
Kostas Bariotis
a357d00bbe
Hint for shortcut for moving the visible area (#1784) 2020-06-19 22:28:13 +02:00
Oliver Benns
ca87ca6fe9
Add user list component + snap to user functionality (#1749) 2020-06-19 12:36:49 +02:00
Thomas Steiner
5d3867d8ac
Implement Save without re-prompt and Save as (#1709)
* Implement Save without re-prompt and Save as
Fixes #1668

* Add save-as icon

* Make .excalidraw the default extension

* Only show save as button on supporting browsers
2020-06-12 18:35:04 +02:00
Pete Hunt
f7c4efbd35
Excalicharts MVP (#1723)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-06-06 22:09:04 +02:00
David Luzar
14a66956d7
Implement line editing (#1616)
* implement line editing

* line editing with rotation

* ensure adding new points is disabled on point dragging

* fix hotkey replacement

* don't paint bounding box when creating new multipoint

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

* don't persist editingLinearElement to localStorage

* don't mutate on noop points updates

* account for rotation when adding new point

* ensure clicking on points doesn't deselect element

* tweak history handling around editingline element

* update snapshots

* refactor pointerMove handling

* factor out point dragging

* factor out pointerDown

* improve positioning with rotation

* revert to use roughjs for calculating points bounds

* migrate from storing editingLinearElement.element to id

* make GlobalScene.getElement into O(1)

* use Alt for adding new points

* fix adding and deleting a point with rotation

* disable resize handlers & bounding box on line edit

Co-authored-by: daishi <daishi@axlight.com>
2020-06-01 11:35:44 +02:00
Pete Hunt
61e5b66dac
Group/ungroup (#1648)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-05-26 13:07:46 -07:00
Richard Keenan
33fe223b5d
Typo fix in desc_exitSession en.json (#1619) 2020-05-19 19:33:37 +02:00
Yuval Ashkenazi
9bd72f91fc
fixed typo: loose ==> lose (#1601) 2020-05-14 21:16:39 +02:00
David Luzar
39c56a4c01
implement stroke style (#1571) 2020-05-14 17:04:33 +02:00
Kostas Bariotis
9ec43d2626
Add free draw mode (#1570) 2020-05-12 21:10:11 +02:00
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
2020-05-09 16:27:42 +03:00
Aakansha Doshi
1866074c07
Add Zen mode for distraction free drawing (#1450) 2020-04-25 15:13:02 +02:00
Lipis
fc802c758f
Update shield's tooltip (#1466) 2020-04-22 21:52:14 +03:00
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>
2020-04-22 17:57:17 +02:00
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>
2020-04-19 12:50:23 -07:00
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>
2020-04-18 15:50:30 +02:00
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>
2020-04-17 22:39:15 +02:00
Lipis
2b9ae38946
Alt drag to shortcuts for duplicate (#1389) 2020-04-11 23:04:53 +02:00
Lipis
f134211bf9
Ask for name instead of username (#1362) 2020-04-10 18:12:51 +03:00
Lipis
70e7dd6e3b
Add more shortcuts and minor refactor (#1347) 2020-04-09 22:58:29 +03:00
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>
2020-04-08 22:00:27 +02:00
Lipis
26fd2fe165
Better name for app state (#1300)
* Better name for app state

* Snapshot
2020-04-07 15:31:28 -07:00
Lipis
03c22c1255
Switch to Sentence case instead of Title Case (#1279) 2020-04-07 16:57:27 +03:00
Lipis
5b684495ef
Translate click and change label (#1299) 2020-04-07 16:40:37 +03:00
Lipis
0c3d34261e
Fixes in Shortcuts dialog and minor refactor (#1297) 2020-04-07 14:39:06 +03:00
Mohit kumar Bajoria
e4c154f43e
Button for shortcuts (#1253) 2020-04-07 13:42:10 +03:00
Lipis
0c41f3e7aa
Add curved lines/arrows shortcuts (#1274) 2020-04-06 17:26:05 +03:00
Roxana Chiorean
d5366db341
Adding ability to copy to clipboard as SVG (#1250) 2020-04-06 02:13:17 +03:00
Mohit kumar Bajoria
2de4fe29ad
Full Screen mode (#1212) 2020-04-06 00:47:13 +03:00
Lipis
9a0889c698
Show shortcuts dialog when pressing ? (#1224) 2020-04-05 15:58:00 +03:00
Kostas Bariotis
0c9459e9e5
Warn on invalid JSON file (#1159)
* add error dialog

* show error modal on file dnd

* add locales

* Update src/locales/en.json

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

* Update src/data/blob.ts

* Update src/data/blob.ts

* fix titles, update snapshots

* make modal smaller

* fix dnd wrong file type

* reset errorMessage

Co-authored-by: Faustino Kialungila <faustino.kialungila@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-04-03 13:50:51 +02:00
Daishi Kato
65be7973be
Rotation support (#1099)
* rotate rectanble with fixed angle

* rotate dashed rectangle with fixed angle

* fix rotate handler rect

* fix canvas size with rotation

* angle in element base

* fix bug in calculating canvas size

* trial only for rectangle

* hitTest for rectangle rotation

* properly resize rotated rectangle

* fix canvas size calculation

* giving up... workaround for now

* **experimental** handler to rotate rectangle

* remove rotation on copy for debugging

* update snapshots

* better rotation handler with atan2

* rotate when drawImage

* add rotation handler

* hitTest for any shapes

* fix hitTest for curved lines

* rotate text element

* rotation locking

* hint messaage for rotating

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

* refactor hitTest

* support exporting png

* support exporting svg

* fix rotating curved line

* refactor drawElementFromCanvas with getElementAbsoluteCoords

* fix export png and svg

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

* do not make handlers big on mobile

* Update src/locales/en.json

Alright!

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

* do not show rotation/resizing hints on mobile

* proper calculation for N and W positions

* simplify calculation

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

* update snapshots excluding rotation handle

* refactor with adjustPositionWithRotation

* refactor with adjustXYWithRotation

* forgot to rename rotation

* rename internal function

* initialize element angle on restore

* rotate wysiwyg editor

* fix shift-rotate around 270deg

* improve rotation locking

* refactor adjustXYWithRotation

* avoid rotation degree becomes >=360

* refactor with generateHandler

Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-04-02 10:40:26 +02:00
Sanghyeon Lee
86d0da5204
Add duplicate button for mobile view (#1146)
* Add a icon for dulplication

* Add PanelComponent for duplication

* Add duplicate button for mobile

* Add styles for layout action buttons

* Add a translation for 'Actions'

* Show left action buttons only for desktop

* Add duplicate button at the bottom of mobile

It is provided depending on whether or not it is `multiElement` to maintain space between buttons.
2020-04-01 18:13:53 +03:00
Kostas Bariotis
4ecbbab7da
Add sentry integration (#1141) 2020-03-31 11:37:51 +03:00
David Luzar
cf4fa30a57
tweak png copy button label (#1062)
* tweak png copy button label

* fix lint
2020-03-23 16:15:22 +01:00
David Luzar
b7da524538
confirm arrow on doubleclick (#949)
* confirm arrow on double click

* change hint

* fix cursor not updating on click
2020-03-18 16:43:06 +01:00
Jed Fox
d8bbe536a7
Restyle the mobile UI a bit (#1002)
* Restyle the bottom bar on mobile as an Island

* Shorter label for collaboration button, truncate too-long button labels

* Refactor safe area things to global vars

* Fix scroll bar positioning, don’t block scrollbars with menu island

* Update text
2020-03-18 11:31:40 -04:00