mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix corners
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
043c95fcc0
commit
7d2253b75f
1 changed files with 5 additions and 5 deletions
|
@ -207,7 +207,7 @@ const strokeDiamondWithRotation = (
|
|||
context.save();
|
||||
context.translate(x, y);
|
||||
context.rotate(element.angle);
|
||||
padding = 45;
|
||||
|
||||
{
|
||||
context.beginPath();
|
||||
|
||||
|
@ -215,10 +215,10 @@ const strokeDiamondWithRotation = (
|
|||
getDiamondPoints(element);
|
||||
const verticalRadius = element.roundness
|
||||
? getCornerRadius(Math.abs(topX - leftX), element)
|
||||
: 1;
|
||||
: (topX - leftX) * 0.01;
|
||||
const horizontalRadius = element.roundness
|
||||
? getCornerRadius(Math.abs(rightY - topY), element)
|
||||
: 1;
|
||||
: (rightY - topY) * 0.01;
|
||||
const topApprox = offsetBezier(
|
||||
pointFrom(topX - verticalRadius, topY + horizontalRadius),
|
||||
pointFrom(topX, topY),
|
||||
|
@ -270,10 +270,10 @@ const strokeDiamondWithRotation = (
|
|||
getDiamondPoints(element);
|
||||
const verticalRadius = element.roundness
|
||||
? getCornerRadius(Math.abs(topX - leftX), element)
|
||||
: 1;
|
||||
: (topX - leftX) * 0.01;
|
||||
const horizontalRadius = element.roundness
|
||||
? getCornerRadius(Math.abs(rightY - topY), element)
|
||||
: 1;
|
||||
: (rightY - topY) * 0.01;
|
||||
const topApprox = offsetBezier(
|
||||
pointFrom(topX + verticalRadius, topY + horizontalRadius),
|
||||
pointFrom(topX, topY),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue