* 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>
* 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
Arrows now only bind to new shapes if their start or end point is dragged close to them. Arrows previously bound to shapes remain bound on move and drag if at the end of the drag/move the points remain in the original shapes' binding area.
---------
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
Co-authored-by: Sammy Lee <sammy.joe.lee@gmail.com>
* Introducing fractional indices as part of `element.index`
* Ensuring invalid fractional indices are always synchronized with the array order
* Simplifying reconciliation based on the fractional indices
* Moving reconciliation inside the `@excalidraw/excalidraw` package
---------
Co-authored-by: Marcel Mraz <marcel@excalidraw.com>
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
* new collision api
* isPointOnShape
* removed redundant code
* new collision methods in app
* curve shape takes starting point
* clean up geometry
* curve rotation
* freedraw
* inside curve
* improve ellipse inside check
* ellipse distance func
* curve inside
* include frame name bounds
* replace previous private methods for getting elements at x,y
* arrow bound text hit detection
* keep iframes on top
* remove dependence on old collision methods from app
* remove old collision functions
* move some hit functions outside of app
* code refactor
* type
* text collision from inside
* fix context menu test
* highest z-index collision
* fix 1px away binding test
* strictly less
* remove unused imports
* lint
* 'ignore' resize flipping test
* more lint fix
* skip 'flips while resizing' test
* more test
* fix merge errors
* fix selection in resize test
* added a bit more comment
---------
Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>