From f40d8a7afb29eb3bbb0e2ccec88668a42f37c043 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 11 Jul 2024 17:18:18 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Roof2.jsx | 12 ++++++------ src/components/fabric/QPolygon.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/Roof2.jsx b/src/components/Roof2.jsx index 270e4fda..9e8f55ff 100644 --- a/src/components/Roof2.jsx +++ b/src/components/Roof2.jsx @@ -151,12 +151,12 @@ export default function Roof2() { ] const type3 = [ - { x: 100, y: 50 }, - { x: 100, y: 650 }, + { x: 200, y: 150 }, + { x: 200, y: 650 }, { x: 450, y: 650 }, - { x: 450, y: 400 }, - { x: 700, y: 400 }, - { x: 700, y: 50 }, + { x: 450, y: 500 }, + { x: 650, y: 500 }, + { x: 650, y: 150 }, ] const type4 = [ @@ -169,7 +169,7 @@ export default function Roof2() { ] if (canvas) { const polygon = new QPolygon( - type2, + type3, { fill: 'transparent', stroke: 'black', diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index 2f1842ed..7fbe9d4a 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -616,7 +616,7 @@ export default class QPolygon extends fabric.Group { y: (lines[1].y1 + lines[1].y2) / 2, } - ridgeLength = Math.min(this.lines[0].length, this.lines[3].length) + ridgeLength = Math.min(this.lines[2].length, this.lines[3].length) ridgePoint1 = [vPoint1.x, vPoint1.y, vPoint1.x, vPoint1.y - ridgeLength] ridgePoint2 = [vPoint2.x, vPoint2.y, vPoint2.x - ridgeLength, vPoint2.y] } else if (type === 4) {