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:
Arun 2022-02-09 22:13:21 +05:30 committed by GitHub
parent ae8b1d8bf7
commit 0cdd0eebf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 89 additions and 27 deletions

View file

@ -9,7 +9,8 @@ export const hasBackground = (type: string) =>
type === "rectangle" ||
type === "ellipse" ||
type === "diamond" ||
type === "line";
type === "line" ||
type === "freedraw";
export const hasStrokeColor = (type: string) => type !== "image";