remove redundant code
This commit is contained in:
parent
eec3f67d72
commit
fdbf316cc1
@ -649,25 +649,6 @@ export const getArrowheadPoints = (
|
|||||||
return [x2, y2, x3, y3, x4, y4];
|
return [x2, y2, x3, y3, x4, y4];
|
||||||
};
|
};
|
||||||
|
|
||||||
const generateLinearElementShape = (
|
|
||||||
element: ExcalidrawLinearElement,
|
|
||||||
): Drawable => {
|
|
||||||
const generator = rough.generator();
|
|
||||||
const options = generateRoughOptions(element);
|
|
||||||
|
|
||||||
const method = (() => {
|
|
||||||
if (element.roundness) {
|
|
||||||
return "curve";
|
|
||||||
}
|
|
||||||
if (options.fill) {
|
|
||||||
return "polygon";
|
|
||||||
}
|
|
||||||
return "linearPath";
|
|
||||||
})();
|
|
||||||
|
|
||||||
return generator[method](element.points as Mutable<Point>[], options);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getLinearElementRotatedBounds = (
|
const getLinearElementRotatedBounds = (
|
||||||
element: ExcalidrawLinearElement,
|
element: ExcalidrawLinearElement,
|
||||||
cx: number,
|
cx: number,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user