feat: sharpness (#1931)
* feat: sharpness * feat: fill sharp lines, et al. * fix: rotated positioning * chore: simplify path with Q * fix: hit test inside sharp elements * make sharp / round buttons work properly * fix tsc tests * update snapshots * update snapshots * fix: sharp arrow creation error * fix merge and test * avoid type assertion * remove duplicate helper Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
@ -20,6 +20,12 @@ export const hasStroke = (type: string) =>
|
||||
type === "draw" ||
|
||||
type === "line";
|
||||
|
||||
export const canChangeSharpness = (type: string) =>
|
||||
type === "rectangle" ||
|
||||
type === "arrow" ||
|
||||
type === "draw" ||
|
||||
type === "line";
|
||||
|
||||
export const hasText = (type: string) => type === "text";
|
||||
|
||||
export const getElementAtPosition = (
|
||||
|
@ -165,5 +165,6 @@ const getWatermarkElement = (maxX: number, maxY: number) => {
|
||||
strokeStyle: "solid",
|
||||
roughness: 1,
|
||||
opacity: 100,
|
||||
strokeSharpness: "sharp",
|
||||
});
|
||||
};
|
||||
|
@ -10,6 +10,7 @@ export { normalizeScroll, calculateScrollCenter } from "./scroll";
|
||||
export {
|
||||
hasBackground,
|
||||
hasStroke,
|
||||
canChangeSharpness,
|
||||
getElementAtPosition,
|
||||
getElementContainingPosition,
|
||||
hasText,
|
||||
|
Reference in New Issue
Block a user