Commit Graph

428 Commits

Author SHA1 Message Date
Kostas Bariotis
a357d00bbe Hint for shortcut for moving the visible area () 2020-06-19 22:28:13 +02:00
Oliver Benns
ca87ca6fe9 Add user list component + snap to user functionality () 2020-06-19 12:36:49 +02:00
Thomas Steiner
5d3867d8ac Implement Save without re-prompt and Save as ()
* Implement Save without re-prompt and Save as
Fixes 

* 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
Saransh Barua
998f0ae458 remove z-index for color-picker-hash div () 2020-06-08 06:52:54 -04:00
Aakansha Doshi
60973f6dc5 rename container class to excalidraw and move css from index.html to app.css ()
Moved the css from index.html to app.css so it can be included in upstream app as well
2020-06-08 13:36:35 +03:00
Daishi Kato
53ab46126d support resizing multiple elements including texts ()
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-06-08 11:25:20 +02:00
Pete Hunt
f7c4efbd35 Excalicharts MVP ()
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-06-06 22:09:04 +02:00
Steven Nguyen
fd75b88bd3 Double finger zoom should not select things () 2020-06-02 19:41:40 +03:00
David Luzar
14a66956d7 Implement line editing ()
* 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
David Luzar
f413bab3de Fix group element removing () 2020-05-30 13:48:57 -07:00
Aakansha Doshi
17e9cc4506 Some cleanup in App.tsx () 2020-05-30 15:26:17 +02:00
Aakansha Doshi
fa359034c5 scroll the closest element to center ()
Co-authored-by: Sanghyeon Lee <yongdamsh@gmail.com>
2020-05-30 14:02:32 +02:00
David Luzar
44a88d2d58 Rewrite restore to guard against missing migrations () 2020-05-28 02:41:34 -07:00
David Luzar
5327e8a3dc fix language change not rerendering ui () 2020-05-27 16:46:11 +02:00
David Luzar
63c10743fb split font into fontSize and fontFamily () 2020-05-27 15:14:50 +02:00
Pete Hunt
61e5b66dac Group/ungroup ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-05-26 13:07:46 -07:00
Aakansha Doshi
5252726307 dynamically import socket.io-client when needed () 2020-05-26 20:51:03 +02:00
David Luzar
d2ae18995c add history.shouldCreateEntry resolver () 2020-05-22 22:26:59 -07:00
Lipis
c427aa3cce Prefer arrow functions and callbacks () 2020-05-20 15:21:37 +02:00
fujimoto kyosuke
afbfe2b8b1 Alt should be labeled as Option on Mac () 2020-05-14 16:51:52 -07:00
David Luzar
39c56a4c01 implement stroke style () 2020-05-14 17:04:33 +02:00
David Luzar
828c9c4d65 use commitToHistory prop for handling draw history () 2020-05-14 14:51:33 +02:00
fujimoto kyosuke
c32640d174 Fix free draw to allow undo () 2020-05-14 13:32:10 +01:00
Kostas Bariotis
9ec43d2626 Add free draw mode () 2020-05-12 21:10:11 +02:00
David Luzar
a90ca5eb84 don't use unicode characters for shortcut help ()
* don't use unicode characters for shortcut help

* use option instead of alt

* make shortcut replacement case-insensitive

* improve shortcut dialog layout
2020-05-11 01:29:35 +03:00
Daishi Kato
394237728f Refactor: resize two-point lines/arrows () 2020-05-10 17:41:36 +02:00
Herb Caudill
48264d1be0 Room dialog: Change 'Name' to 'Your name' ()
* 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
5b80ad045b show reset icon with zoom percentage during zen mode () 2020-05-09 14:47:22 +02:00
Daishi Kato
3b1d6910aa fix resizing: dynamic pointer offset for better UX () 2020-05-09 10:57:00 +02:00
David Luzar
8c8458ceb0 fix incorrect font rendered on late load () 2020-05-08 10:42:51 +02:00
Pete Hunt
4696c9ee0e Syncing optimizations ()
* Syncing optimizations

* Add comment
2020-05-07 14:13:18 -07:00
Ion Rosgrim
dd7aa29297 Rtl ui broken in zen mode () 2020-05-03 03:30:58 +03:00
David Luzar
4aa1784ba3 fix horizontal scroll via shift+wheel on mac () 2020-05-02 13:15:28 -07:00
David Luzar
b7a37c157b scroll horizontally on shift-scroll () 2020-04-30 13:34:38 -07:00
David Luzar
51f8146357 disable pointer events on hidden menus in zen mode () 2020-04-29 22:49:36 +02:00
Aakansha Doshi
0c2aa951d6 refactor toolbutton.tsx - add default props () 2020-04-29 17:13:29 +02:00
Kent Beck
dd1dfc5950 One more socket listener moved to Portal ()
* 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>
2020-04-28 09:49:00 -07:00
Kent Beck
0baabff41b Begin moving socket listeners to Portal () 2020-04-27 10:56:08 -07:00
Faustino Kialungila
582d26e858 fix tool icon button on mobile () 2020-04-26 11:45:35 +02:00
David Luzar
2c5c770e78 rewrite picker color handling () 2020-04-25 23:06:16 +02:00
Aakansha Doshi
1866074c07 Add Zen mode for distraction free drawing () 2020-04-25 15:13:02 +02:00
Warren Seine
71e7f130bc Generalize color normalization () ()
Following , 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)
2020-04-24 11:06:54 -07:00
Warren Seine
fa8354e306 Support different color inputs () () 2020-04-23 09:18:28 -07:00
José Quinto
ed6fb60337 resize elements from center point ()
* 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
Jed Fox
d7729d295a RTL for the security badge, add an arrow to the tooltip ()
* FIx RTL on the encryption shield

* Add an arrow to the tooltip
2020-04-21 14:50:08 -07:00
Ed Bentley
9b7a743e8b Fix bug: Undo multi element ()
* Add failing test

* Fix multi element undo

* Update snapshots
2020-04-20 15:05:39 +02:00
Ed Bentley
5822117e23 Add optional watermark on export ()
* 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. ()
* 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… ()
* 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
Aakansha Doshi
a18342b5b5 Refactor LayerUI ()
* 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
2020-04-17 22:24:19 +02:00