464 Commits

Author SHA1 Message Date
Lipis
5d295415db
Keep errors, elements and comments consistent ()
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-11-05 18:06:18 +01:00
João Forja
566e6a5ede
Zoom on cursor | Issue () 2020-11-04 19:49:15 +02:00
David Luzar
ba3f548b91
Fix library dnd () 2020-10-30 21:01:41 +01:00
Giacomo Debidda
fc58e51ab3
Show error message when canvas to export is too big () ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-28 20:52:53 +01:00
David Luzar
f404ab6f50
clear deleted elements on room create () 2020-10-26 15:53:55 +01:00
David Luzar
900e0f27ad
expose resetHistory & factor out from updateScene () 2020-10-25 15:48:16 +01:00
Aakansha Doshi
e916d7f6f6
expose resetScene and getSceneElementsIncludingDeleted && move excalidrawApp to excalidraw-app folder ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-25 15:09:57 +01:00
David Luzar
72a3450c99
allow to supply canvas offsets from upstream () 2020-10-23 19:06:16 +02:00
Aakansha Doshi
499a60309f
factor reconcilation out of updateScene & remove replaceAll ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-22 23:47:34 +02:00
Aakansha Doshi
6db5647048
move broadcastScene and broadcastMouseLocation to portal () 2020-10-21 15:41:20 +02:00
David Luzar
1484c5a63b
fileHandle refactor & fixes () 2020-10-19 10:53:37 +02:00
David Luzar
538f2be097
add export error handling () 2020-10-16 11:53:40 +02:00
David Luzar
5950fa9a40
support embedding scene data to PNG/SVG ()
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-10-13 14:47:07 +02:00
David Luzar
7618ca48d7
retain local appState props on restore ()
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-10-13 13:46:52 +02:00
Aakansha Doshi
63566ecb92
Expose update scene via refs ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-11 18:11:26 +02:00
David Luzar
d18a72c879
save room to firebase on unload or portal close ()
* save on unload or portal close

* align naming
2020-10-05 22:34:40 -04:00
David Luzar
ae1ab1ab37
clear scene when joining a room ()
* clear scene when joining a room

* code shuffle

* remove noop code path
2020-10-05 22:31:34 -04:00
Pete Hunt
d0985fe67a
Persistent rooms via Firebase ()
* Periodically back up collaborative rooms in firebase

* Responses to code review

* comments from code review, new firebase credentials
2020-10-04 11:12:47 -07:00
Pete Hunt
8ab9ffbe28
One-click installable libraries ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-01 19:12:43 +02:00
Aakansha Doshi
a61b212220
scope css under name space excalidraw () 2020-09-25 23:18:45 +02:00
David Luzar
adb1ac5788
fix restoring appState () 2020-09-22 21:51:49 +02:00
Thomas Steiner
b2822f3538
Make File Handling actually work ()
Follow-up from 
2020-09-22 15:21:22 +02:00
Pete Hunt
68bdfaefbe
Fix pinch-to-zoom performance () 2020-09-21 21:16:34 +02:00
Pete Hunt
e3f3427b31
Fix middle mouse panning on windows () 2020-09-21 10:15:40 +02:00
João Forja
242ccac290
Arrows binds/unbinds to bindable elements when moved with arrow keys (Issue ) () 2020-09-13 19:17:16 +02:00
Robert van Hoesel
c6736fa14e
Lock drag direction using Shift ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-09-11 17:22:40 +02:00
David Luzar
aaddde5dd9
Fix history initialization () 2020-09-09 21:08:06 +02:00
Mohamed Saleh
9cac7816cc
Fix textbox element bindings on size changes ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-09-08 18:03:49 +02:00
David Luzar
47dba05c91
System clipboard () 2020-09-04 14:58:32 +02:00
Michal Srb
15e4b51bb1
Fix binding disabling when taking screenshots on macOS ()
* Fix binding disabling when taking screenshots on macOS
* Update snapshot for cmd+click test
2020-09-03 16:12:01 +02:00
Thomas Steiner
730a11e0a5
Assign file handle to dropped files ()
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-08-31 13:11:14 +02:00
João Forja
0ab58b38e0
Fix bug of issue ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-30 13:10:07 +02:00
Maurice Le Cordier
d15444e232
allowed for sticking to grid when pasting an element () 2020-08-29 20:01:36 +02:00
Michal Srb
7ebeae2d38
Fix arrow rebinding on rotation (take 2) ()
* Clear up test, fix simple rotation
* Fix eligibility rules
2020-08-29 17:56:03 +02:00
David Luzar
26ef235019
rebind arrow on rotation () 2020-08-29 14:16:40 +02:00
David Luzar
0e28177ccc
fix collab MOUSE_LOCATION payload naming for legacy versions () 2020-08-29 14:12:58 +02:00
Anton
1828a93ba7
Fix keypress rebinding ()
Co-authored-by: Anton <anton.matrenin@introduct.tech>
2020-08-29 14:12:28 +02:00
Daishi Kato
84c49ebaa1
Support rotating two-point lines (angle can be non-zero) ()
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-08-28 10:20:06 +02:00
David Luzar
4c2d34ffd7
select single element on cmd-click () 2020-08-27 20:59:46 +02:00
David Luzar
b8f8bc2e32
fix group selection () 2020-08-27 20:32:10 +02:00
João Forja
e7d186b439
Fix drag multiple elements bug ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-26 18:37:44 +02:00
Aakansha Doshi
4718c31da5
Pass Additional props remove localstorage related code for storing data and username from App.tsx to index.tsx ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-26 12:45:54 +02:00
David Luzar
ab7073abdb
add excalidraw_embed into base repo ()
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-08-20 16:45:20 +02:00
Thomas Steiner
80cbe13167
Make iOS "safe area" respect dark mode () 2020-08-20 13:20:13 +02:00
Warren Seine
4644ca1778
🎨 Use consistent naming () 2020-08-14 20:14:22 +02:00
Daishi Kato
41cb1fbeba
feat: sharpness ()
* 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
Warren Seine
2cb8ba6521
add explanation for why we mutate collaborators state ()
* 🔒 Avoid mutating state

* revert to mutation and add explaining comment

Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-13 17:20:38 +02:00
Michal Srb
c0dd870c6e
Dark mode ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-13 13:35:31 +02:00
David Luzar
950bcd0b72
Refactor resize handle naming () 2020-08-10 14:16:39 +02:00
Michal Srb
26f67d27ec
Allow binding linear elements to other elements ()
* 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
2020-08-08 21:04:15 -07:00