From 038cff87939dfa259b02708fdc3a9da24b26c97e Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Sun, 12 Apr 2020 10:19:01 +0900 Subject: [PATCH] fix calc diamond bounds (#1394) --- src/element/bounds.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/element/bounds.ts b/src/element/bounds.ts index db17c7ea..6311779a 100644 --- a/src/element/bounds.ts +++ b/src/element/bounds.ts @@ -288,7 +288,7 @@ export const getElementBounds = ( if (element.type === "diamond") { const [x11, y11] = rotate(cx, y1, cx, cy, element.angle); const [x12, y12] = rotate(cx, y2, cx, cy, element.angle); - const [x22, y22] = rotate(x2, cy, cx, cy, element.angle); + const [x22, y22] = rotate(x1, cy, cx, cy, element.angle); const [x21, y21] = rotate(x2, cy, cx, cy, element.angle); const minX = Math.min(x11, x12, x22, x21); const minY = Math.min(y11, y12, y22, y21);