Commit Graph

85 Commits (21815fb930f282fdd5ef86c0877b0bd82f3dead1)

Author SHA1 Message Date
David Luzar 47ee8a0094
refactor: `point()` -> `pointFrom()` to fix compiler issue (#8578) 4 months ago
Subhadeep Sengupta a977dd1bf5
feat: Added reddit links as embeddable (#8099)
feat: #8063 Added reddit links as embeddable

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
4 months ago
Márk Tolmács f3f0ab7c83
fix: Elbow arrow fixedpoint flipping now properly flips on inverted resize and flip action (#8324)
* Flipping action now properly mirrors selections with elbow arrows
* Flipping action now re-centers the selection to the original center to avoid "walking" selections on repeated flipping
5 months ago
Márk Tolmács e0a22edfbd
fix: Re-route elbow arrows when pasted (#8448)
Re-route elbow arrows when pasted
5 months ago
Márk Tolmács c07f5a0c80
feat: Common elbow mid segments (#8440)
Common start or end segment length for elbow arrows regardless of arrowhead is present
5 months ago
zsviczian 60e3801691
fix: WYSIWYG editor padding is not normalized with zoom.value (#8481) 5 months ago
David Luzar fd39712ba6
fix: improve canvas search scroll behavior further (#8491) 5 months ago
Ryan Di 6959a363f0
feat: canvas search (#8438)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
5 months ago
Márk Tolmács f4dd23fc31
chore: Unify math types, utils and functions (#8389)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
5 months ago
David Luzar 00af35c692
feat: enable panning/zoom while in wysiwyg (#8437) 5 months ago
Márk Tolmács ea7c702cfc
feat: Visual debugger (#8344)
Add visual debugger to the Excalidraw app (only).
5 months ago
David Luzar 5facc0d6da
fix: perf regression in `getCommonBounds` (#8429) 6 months ago
Ryan Di 5e1ff7cafe
perf: improve new element drawing (#8340)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
David Luzar b5d7f5b4ba
feat: rewrite d2c to not require token (#8269) 6 months ago
David Luzar 3cfcc7b489
feat: split `gridSize` from enabled state & support custom `gridStep` (#8364) 6 months ago
David Luzar 4320a3cf41
feat: improve zoom-to-content when creating flowchart (#8368) 6 months ago
Márk Tolmács 8420e1aa13
fix: Reimplement rectangle intersection (#8367) 6 months ago
Márk Tolmács 5daf1a1b4e
fix: Round coordinates and sizes for rectangle intersection (#8366)
Round coordinates and sizes for rectangle intersection
6 months ago
David Luzar 97981804d7
feat: Stats popup style tweaks (#8361) 6 months ago
Clarence Chan f7b3befd0a
fix: text content with tab characters act different in view/edit (#8336)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
Márk Tolmács 99b91c46f7
fix: Yet more patching of intersect code (#8352)
* Yet more patching of intersect code
6 months ago
David Luzar 1ea5b26f25
fix: missing `act()` in flowchart tests (#8354) 6 months ago
Márk Tolmács 261304c1a4
fix: Patch over intersection calculation issue (#8350)
* Patch over intersection calculation issue
6 months ago
Márk Tolmács 84398a7e5c
fix: Point duplication in LEE on ALT+click (#8347) 6 months ago
Ryan Di 54491d13d4
feat: create flowcharts from a generic element using elbow arrows (#8329)
Co-authored-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
Márk Tolmács dd1370381d
chore: Refactor and remove scene from elbow arrow generation (#8342)
* Refactor and remove scene from elbow arrow generation
6 months ago
Márk Tolmács 72d6ee48fc
fix: Do not allow resizing unbound elbow arrows either (#8333)
* Fix resizing of unbound elbow arrows
6 months ago
David Luzar f19ce30dfe
chore: bump `@testing-library/react` `12.1.5` -> `16.0.0` (#8322) 6 months ago
Ryan Di 3cf14c73a3
refactor: rename `draggingElement` -> `newElement` (#8294)
* add newElement to appState

* freedraw should not be an editing element

* do not set editing element for freedraw and generic

* remove ununsed `appState.draggingElement`

* remove setting dragged for new linear element

* decouple selection element from new element

* fix hint for text bindables

* update snapshot

* fixes

* fix frame regressions

* add comments to types

* document `editingElement`

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
zsviczian c67815f7b0
fix: Duplicating arrow without bound elements throws error (#8316)
Co-authored-by: David Luzar <5153846+dwelle@users.noreply.github.com>
6 months ago
David Luzar e63dd025c9
fix: allow binding elbow arrows to frame children (#8309) 6 months ago
Márk Tolmács 15e019706d
feat: Orthogonal (elbow) arrows for diagramming (#8299)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
6 months ago
Ryan Di 7b36de0476
fix: linear elements not selected on pointer up from hitting its bound text (#8285)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
Marcel Mraz 62228e0bbb
feat: introduce font picker (#8012)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
7 months ago
David Luzar 1d5b41dabb
fix: stop updating text versions on init (#8191) 7 months ago
Márk Tolmács 66a2f24296
fix: Add binding update to manual stat changes (#8183)
Manual stats changes now respect previous element bindings.
7 months ago
Márk Tolmács 04668d8263
fix: Binding after duplicating is now applied for both the old and duplicate shapes (#8185)
Using ALT/OPT + drag to clone does not transfer the bindings (or leaves the duplicates in place of the old one , which are also not bound).

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
7 months ago
Márk Tolmács ba8c09d529
fix: Incorrect point offsetting in LinearElementEditor.movePoints() (#8145)
The LinearElementEditor.movePoints() function incorrectly calculates the offset for local linear element points when multiple targetPoints are provided, one of those target points is index === 0 AND the other points are moved in the negative direction, and ending up with negative local coordinates.

Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
7 months ago
zsviczian a1ffa064df
fix: only bind arrow (#8152)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
8 months ago
David Luzar 4dc4590f24
fix: repair invalid binding on restore & fix type check (#8133) 8 months ago
Ryan Di d2f67e619f
feat: editable element stats (#6382)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
8 months ago
David Luzar 08b13f971d
fix: wysiwyg blur-submit on mobile (#8075) 9 months ago
David Luzar 69f4cc70cb
feat: stop autoselecting text on text edit on mobile (#8076) 9 months ago
Ryan Di 860308eb27
feat: create new text with width (#8038)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Marcel Mraz 661d6a4a75
fix: flaky snapshot tests with floating point precision issues (#8049) 9 months ago
Ryan Di c540bd68aa
feat: wrap long text when pasting (#8026)
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Ryan Di 971b4d4ae6
feat: text wrapping (#7999)
* resize single elements from the side

* fix lint

* do not resize texts from the sides (for we want to wrap/unwrap)

* omit side handles for frames too

* upgrade types

* enable resizing from the sides for multiple elements as well

* fix lint

* maintain aspect ratio when elements are not of the same angle

* lint

* always resize proportionally for multiple elements

* increase side resizing padding

* code cleanup

* adaptive handles

* do not resize for linear elements with only two points

* prioritize point dragging over edge resizing

* lint

* allow free resizing for multiple elements at degree 0

* always resize from the sides

* reduce hit threshold

* make small multiple elements movable

* lint

* show side handles on touch screen and mobile devices

* differentiate touchscreens

* keep proportional with text in multi-element resizing

* update snapshot

* update multi elements resizing logic

* lint

* reduce side resizing padding

* bound texts do not scale in normal cases

* lint

* test sides for texts

* wrap text

* do not update text size when changing its alignment

* keep text wrapped/unwrapped when editing

* change wrapped size to auto size from context menu

* fix test

* lint

* increase min width for wrapped texts

* wrap wrapped text in container

* unwrap when binding text to container

* rename `wrapped` to `autoResize`

* fix lint

* revert: use `center` align when wrapping text in container

* update snaps

* fix lint

* simplify logic on autoResize

* lint and test

* snapshots

* remove unnecessary code

* snapshots

* fix: defaults not set correctly

* tests for wrapping texts when resized

* tests for text wrapping when edited

* fix autoResize refactor

* include autoResize flag check

* refactor

* feat: rename action label & change contextmenu position

* fix: update version on `autoResize` action

* fix infinite loop when editing text in a container

* simplify

* always maintain `width` if `!autoResize`

* maintain `x` if `!autoResize`

* maintain `y` pos after fontSize change if `!autoResize`

* refactor

* when editing, do not wrap text in textWysiwyg

* simplify text editor

* make test more readable

* comment

* rename action to match file name

* revert function signature change

* only update  in app

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
9 months ago
Marcel Mraz dc66261c19
fix: re-introduce wysiwyg width offset (#8014) 9 months ago
David Luzar 273ba803d9
fix: font not rendered correctly on init (#8002) 9 months ago
Aakansha Doshi 1ed53b153c
build: enable consistent type imports eslint rule (#7992)
* build: enable consistent type imports eslint rule

* change to warn

* fix the warning in example and excalidraw-app

* fix packages

* enable type annotations and throw error for the rule
9 months ago