From 76d9a046a43aa4a450a1b244eda85a3258831cf8 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Wed, 31 Jul 2024 10:55:36 +0900 Subject: [PATCH] =?UTF-8?q?QPolygon=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/fabric/QPolygon.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/fabric/QPolygon.js b/src/components/fabric/QPolygon.js index 73732dea..c178714a 100644 --- a/src/components/fabric/QPolygon.js +++ b/src/components/fabric/QPolygon.js @@ -2,7 +2,7 @@ import { fabric } from 'fabric' import { v4 as uuidv4 } from 'uuid' import { QLine } from '@/components/fabric/QLine' import { distanceBetweenPoints, findTopTwoIndexesByDistance, getDirectionByPoint, sortedPointLessEightPoint, sortedPoints } from '@/util/canvas-util' -import { drawHelpLineInHexagon2 } from '@/util/qpolygon-utils' +import { drawHelpLineInHexagon } from '@/util/qpolygon-utils' export const QPolygon = fabric.util.createClass(fabric.Polygon, { type: 'QPolygon', @@ -10,6 +10,9 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { texts: [], id: null, length: 0, + hips: [], + ridges: [], + connectRidges: [], initialize: function (points, options, canvas) { // 소수점 전부 제거 points.forEach((point) => { @@ -122,7 +125,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { // 보조선 그리기 drawHelpLine(chon = 4) { - drawHelpLineInHexagon2(this, chon) + drawHelpLineInHexagon(this, chon) }, addLengthText() { @@ -313,4 +316,5 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, { text.set({ visible: isView }) }) }, + divideLine() {}, })