Commit Graph

362 Commits

Author SHA1 Message Date
f40a2230ec Fix embedding scene to PNG on Safari (#2235) 2020-10-13 16:55:08 +02:00
5950fa9a40 support embedding scene data to PNG/SVG (#2219)
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-10-13 14:47:07 +02:00
7618ca48d7 retain local appState props on restore (#2224)
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-10-13 13:46:52 +02:00
63566ecb92 Expose update scene via refs (#2217)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-11 18:11:26 +02:00
215128ffdf add titles with width/height to scale buttons in ExportDialog (#2193) 2020-10-07 15:37:38 +02:00
d18a72c879 save room to firebase on unload or portal close (#2207)
* save on unload or portal close

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

* code shuffle

* remove noop code path
2020-10-05 22:31:34 -04:00
6ca7420252 Remove warning about rooms not being persisted (#2199) 2020-10-04 13:02:06 -07:00
d0985fe67a Persistent rooms via Firebase (#2188)
* 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
8ab9ffbe28 One-click installable libraries (#2179)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-10-01 19:12:43 +02:00
a61b212220 scope css under name space excalidraw (#1983) 2020-09-25 23:18:45 +02:00
adb1ac5788 fix restoring appState (#2182) 2020-09-22 21:51:49 +02:00
b2822f3538 Make File Handling actually work (#2181)
Follow-up from #1736
2020-09-22 15:21:22 +02:00
68bdfaefbe Fix pinch-to-zoom performance (#2171) 2020-09-21 21:16:34 +02:00
e3f3427b31 Fix middle mouse panning on windows (#2172) 2020-09-21 10:15:40 +02:00
242ccac290 Arrows binds/unbinds to bindable elements when moved with arrow keys (Issue #2103) (#2150) 2020-09-13 19:17:16 +02:00
c6736fa14e Lock drag direction using Shift (#1858)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-09-11 17:22:40 +02:00
aaddde5dd9 Fix history initialization (#2115) 2020-09-09 21:08:06 +02:00
9cac7816cc Fix textbox element bindings on size changes (#2145)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-09-08 18:03:49 +02:00
47dba05c91 System clipboard (#2117) 2020-09-04 14:58:32 +02:00
15e4b51bb1 Fix binding disabling when taking screenshots on macOS (#2129)
* Fix binding disabling when taking screenshots on macOS
* Update snapshot for cmd+click test
2020-09-03 16:12:01 +02:00
b215e165d2 Fix HintViewer positioning (#2124) 2020-08-31 13:13:34 +02:00
730a11e0a5 Assign file handle to dropped files (#2125)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-08-31 13:11:14 +02:00
0ab58b38e0 Fix bug of issue #2062 (#2108)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-30 13:10:07 +02:00
d15444e232 allowed for sticking to grid when pasting an element (#2107) 2020-08-29 20:01:36 +02:00
7ebeae2d38 Fix arrow rebinding on rotation (take 2) (#2104)
* Clear up test, fix simple rotation
* Fix eligibility rules
2020-08-29 17:56:03 +02:00
26ef235019 rebind arrow on rotation (#2096) 2020-08-29 14:16:40 +02:00
0e28177ccc fix collab MOUSE_LOCATION payload naming for legacy versions (#2098) 2020-08-29 14:12:58 +02:00
1828a93ba7 Fix keypress rebinding (#2102)
Co-authored-by: Anton <anton.matrenin@introduct.tech>
2020-08-29 14:12:28 +02:00
84c49ebaa1 Support rotating two-point lines (angle can be non-zero) (#2090)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-08-28 10:20:06 +02:00
4c2d34ffd7 select single element on cmd-click (#2087) 2020-08-27 20:59:46 +02:00
b8f8bc2e32 fix group selection (#2092) 2020-08-27 20:32:10 +02:00
e7d186b439 Fix drag multiple elements bug (#2023)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-26 18:37:44 +02:00
4718c31da5 Pass Additional props remove localstorage related code for storing data and username from App.tsx to index.tsx (#2057)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-26 12:45:54 +02:00
0e0a695e81 Fix multiline hint text cropping (#2079)
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-08-25 17:09:39 +02:00
c3de4cd4c5 Reduce the padding of the left 'Islands' (#2050) 2020-08-21 01:24:46 +03:00
643e6bd08d feat: Add hint for double click to insert text (#2056) 2020-08-20 22:55:44 +03:00
ab7073abdb add excalidraw_embed into base repo (#2040)
Co-authored-by: Lipis <lipiridis@gmail.com>
2020-08-20 16:45:20 +02:00
80cbe13167 Make iOS "safe area" respect dark mode (#2053) 2020-08-20 13:20:13 +02:00
4644ca1778 🎨 Use consistent naming (#2029) 2020-08-14 20:14:22 +02:00
14317c2232 🐛 Remove unnecessary class name props (#2027)
It's unused and serialized to `undefined`.
2020-08-14 20:05:29 +02:00
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
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
2cb8ba6521 add explanation for why we mutate collaborators state (#2028)
* 🔒 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
5670c47789 🐛 Fix emoji rendering (#2030)
Thanks.
2020-08-13 16:29:33 +02:00
c0dd870c6e Dark mode (#2006)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-08-13 13:35:31 +02:00
950bcd0b72 Refactor resize handle naming (#2013) 2020-08-10 14:16:39 +02:00
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
26f67d27ec Allow binding linear elements to other elements (#1899)
* 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
5f195694ee update simplifier distance to reflect zoom (#2004)
* update simplifier distance to reflect zoom

The distance used in the iterative end-point fit algorithm to
determine if points can be removed no longer ignores the
zoom. As the zoom gets larger this distance will get smaller
and fewer points will be removed, thus making for finer grain
control over the drawing. As the zoom gets smaller the drawing
will get more coarse as more points are removed.

* remove the comment

Co-authored-by: John Dupuis <wasp7@Johns-MacBook-Pro.local>
Co-authored-by: Michal Srb <xixixao@seznam.cz>
2020-08-08 18:50:16 -07:00