mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: support background fill for freedraw shapes (#4610)
* feat: support background fill for freedraw shapes * refactor & support fill style * make filled freedraw shapes selectable from inside * get hit test on solid freedraw shapes to somewhat work * fix SVG export of unclosed freedraw shapes & improve types * fix lint * type tweaks * reuse `hitTestCurveInside` for collision tests Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
ae8b1d8bf7
commit
0cdd0eebf1
4 changed files with 89 additions and 27 deletions
|
@ -185,7 +185,7 @@ const getLinearElementAbsoluteCoords = (
|
|||
maxY + element.y,
|
||||
];
|
||||
} else {
|
||||
const shape = getShapeForElement(element) as Drawable[];
|
||||
const shape = getShapeForElement(element)!;
|
||||
|
||||
// first element is always the curve
|
||||
const ops = getCurvePathOps(shape[0]);
|
||||
|
@ -326,7 +326,7 @@ const getLinearElementRotatedBounds = (
|
|||
return [minX, minY, maxX, maxY];
|
||||
}
|
||||
|
||||
const shape = getShapeForElement(element) as Drawable[];
|
||||
const shape = getShapeForElement(element)!;
|
||||
|
||||
// first element is always the curve
|
||||
const ops = getCurvePathOps(shape[0]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue