Commit Graph

193 Commits (ae8e7aca1653e2c63fc96963d5e8b4e0ffc883c9)

Author SHA1 Message Date
David Luzar 6c81a32d62
fix: text editor not visible in dark mode (#2920) 4 years ago
David Luzar e18e945cd3
fix: incorrect z-index of text editor (#2914) 4 years ago
Aakansha Doshi 675da16ca4
feat: add view mode in Excalidraw (#2840)
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
João Forja e26f374ca6
improvement: Enhance resize for non generic elements (#2720) 4 years ago
David Luzar 3aab81bc35
docs: add tsdoc for certain element props (#2673)
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
4 years ago
Lipis 022f349dc6
feat: Add line chart and paste dialog selection (#2670)
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Jed Fox <git@jedfox.com>
4 years ago
Steve Ruiz c742225f43
More Arrowheads: dot, bar (#2486)
Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
Lipis b2d442abce
Support CSV graphs and improve the look and feel (#2495)
Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis c7b5cdb71e
Reduce the maximum size of the binding gap (#2450) 4 years ago
Steve Ruiz c291edfc44
Add Arrowheads to Arrows (#2452)
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
4 years ago
João Forja aa221837fc
Enhance aspect ratio tools | Rectangle, Diamond, Ellipses (#2439)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Christopher Chedeau 533815c081
Fix middle handles on mobile (#2459)
For rendering we always use mouse in order to check which handles to display but when doing the hit test, we used pointer which has a different size. So we couldn't use the middle handles for small shapes. This is now fixed.

cc @j-f1 as you added it in #790
4 years ago
Lipis b21fd49412
chore: Minor refactoring for consistency (#2425) 4 years ago
Rene a1fbec1030
Remove last committed point json (#2371)
Co-authored-by: rene_mbp <harryloveslearning@googlemail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Lipis a20f3240fd
Prefer arrow functions (#2344) 4 years ago
Lipis e05acd6fd9
Update ESLint rules (#2342) 4 years ago
Lipis 5d295415db
Keep errors, elements and comments consistent (#2340)
Co-authored-by: David Luzar <luzar.david@gmail.com>
4 years ago
João Forja 566e6a5ede
Zoom on cursor | Issue #940 (#2319) 4 years ago
Michal Srb 8a10f2a0b8
Fix collision check for rectangles and rendering of binding area (#2221) 4 years ago
Chrisando Pramudhita e424ca53c6
fix inconsistent text element color on dark mode while editing. (#2196)
On dark mode, while text element is being edited, it was changing color to the light mode variant (white turns back to black, etc...).

This is caused by the --appearance-filter not being applied to the floating textarea. The css var --appearance-filter is only applied to the .excalidraw class while the floating textarea is being appended to the body which put it outside of .excalidraw.

This change adds excalidraw class to the floating textarea and also adds Appearance_dark to it while dark mode is on.
4 years ago
Pete Hunt d0985fe67a
Persistent rooms via Firebase (#2188)
* Periodically back up collaborative rooms in firebase

* Responses to code review

* comments from code review, new firebase credentials
4 years ago
Robert van Hoesel c6736fa14e
Lock drag direction using `Shift` (#1858)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
David Luzar d07099aadd
fix zindex to account for group boundaries (#2065) 4 years ago
David Luzar aaddde5dd9
Fix history initialization (#2115) 4 years ago
Mohamed Saleh 9cac7816cc
Fix textbox element bindings on size changes (#2145)
Co-authored-by: dwelle <luzar.david@gmail.com>
4 years ago
Michal Srb 15e4b51bb1
Fix binding disabling when taking screenshots on macOS (#2129)
* Fix binding disabling when taking screenshots on macOS
* Update snapshot for cmd+click test
4 years ago
Michal Srb 7ebeae2d38
Fix arrow rebinding on rotation (take 2) (#2104)
* Clear up test, fix simple rotation
* Fix eligibility rules
4 years ago
Daishi Kato 84c49ebaa1
Support rotating two-point lines (angle can be non-zero) (#2090)
Co-authored-by: David Luzar <luzar.david@gmail.com>
4 years ago
João Forja e7d186b439
Fix drag multiple elements bug (#2023)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Pedro Baracho e34cf3aee3
Fix #2075 - Pinch zooming while typing text breaks the UI on Chrome Mac OS X (#2076) 5 years ago
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>
5 years ago
Michal Srb c0dd870c6e
Dark mode (#2006)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
João Forja 296e3677cf
Fix single element bounding box bug (#2008)
Co-authored-by: Michal Srb <xixixao@seznam.cz>
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar 964746e569
fix transform handles regression (#2018) 5 years ago
David Luzar 950bcd0b72
Refactor resize handle naming (#2013) 5 years ago
Michal Srb 8bbeb32e87
Fix text selection broken by PR1899 (#2011) 5 years ago
Michal Srb 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
5 years ago
David Luzar fea257765d
regenerate seed on change of sloppiness (#1986) 5 years ago
Daishi Kato 818821c293
feat: grid mode for line editing (#1984) 5 years ago
David Luzar c171fb4c7f
simplify by replacing draggingElementPointIndex with isDragging (#1982)
* simplify by replacing draggingElementPointIndex with isDragging

* add tsdoc
5 years ago
Aakansha Doshi 20500b7822
remove shared global scene and attach it to every instance (#1706)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar ab980b252c
make restore migration types required (#1977) 5 years ago
Aakansha Doshi 7eff6893c5
calculate coords based on container viewport position (#1955)
* feat: calculate coords based on parent left and top so it renders correctly in host App

* fix text

* move offsets to state & fix bugs

* fix text jumping

* account for zoom in textWysiwyg & undo incorrect offsetting

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
David Luzar f295550940
ensure editingLinearElement handles are rendered on top (#1967) 5 years ago
Daishi Kato a2e7d8d560
feat: rotating multiple elements (#1960) 5 years ago
Mohammed Salman bac20fa641
Choosing color before entering text does not update the swatch (Fixes #1897) (#1915)
Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Aakansha Doshi 953cd5563c
move the excalidraw props to correct file and typo fix (#1907) 5 years ago
Daishi Kato 6cc6e13892
adjust font baseline on resize (#1820)
* adjust font baseline on resize

* simplify font scaling on resize

* fix: resizing text to avoid glitchy behavior

* make text resizing deterministic

* no TEXT_WIDTH_PADDING hack

Co-authored-by: dwelle <luzar.david@gmail.com>
5 years ago
Michal Srb 5d7020cce6
Refactoring in pointer down event handler (#1880)
* Refactor: Move context menu touch device handling

* Refactor: Move more stuff out of pointer down

* Refactor: Move last coords into an object

* Refactor: Move scrollbar handling out of pointer down

* Refactor: simplify resizing in pointer down

* Refactor: further simplify resizing in pointer down

* Refactor: clarify clearing selection code

* Refactor: move out clearing selection from pointer down

* Refactor: further simplify deselection in pointer down
5 years ago
Aakansha Doshi 9351b2821c
feat: add width, height as props to App.tsx (#1871) 5 years ago