feat: improved freedraw (#3512)

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Steve Ruiz 2021-05-09 16:42:10 +01:00 committed by GitHub
parent 198800136e
commit 49c6bdd520
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 786 additions and 247 deletions

View file

@ -9,22 +9,25 @@ export const hasBackground = (type: string) =>
type === "rectangle" ||
type === "ellipse" ||
type === "diamond" ||
type === "draw" ||
type === "line";
export const hasStroke = (type: string) =>
export const hasStrokeWidth = (type: string) =>
type === "rectangle" ||
type === "ellipse" ||
type === "diamond" ||
type === "freedraw" ||
type === "arrow" ||
type === "line";
export const hasStrokeStyle = (type: string) =>
type === "rectangle" ||
type === "ellipse" ||
type === "diamond" ||
type === "arrow" ||
type === "draw" ||
type === "line";
export const canChangeSharpness = (type: string) =>
type === "rectangle" ||
type === "arrow" ||
type === "draw" ||
type === "line";
type === "rectangle" || type === "arrow" || type === "line";
export const hasText = (type: string) => type === "text";

View file

@ -9,7 +9,8 @@ export {
export { calculateScrollCenter } from "./scroll";
export {
hasBackground,
hasStroke,
hasStrokeWidth,
hasStrokeStyle,
canHaveArrowheads,
canChangeSharpness,
getElementAtPosition,