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() {}, })