From cc7f1ad6af9f11890d375bb9aa7e61b116744d96 Mon Sep 17 00:00:00 2001 From: "hyojun.choi" Date: Thu, 31 Jul 2025 16:04:56 +0900 Subject: [PATCH] =?UTF-8?q?globalPitch=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/usePolygon.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hooks/usePolygon.js b/src/hooks/usePolygon.js index baefd30f..4514cb7e 100644 --- a/src/hooks/usePolygon.js +++ b/src/hooks/usePolygon.js @@ -1,4 +1,4 @@ -import { ANGLE_TYPE, canvasState, currentAngleTypeSelector, pitchTextSelector } from '@/store/canvasAtom' +import { ANGLE_TYPE, canvasState, currentAngleTypeSelector, globalPitchState, pitchTextSelector } from '@/store/canvasAtom' import { useRecoilValue } from 'recoil' import { fabric } from 'fabric' import { calculateIntersection, findAndRemoveClosestPoint, getDegreeByChon, getDegreeInOrientation, isPointOnLine } from '@/util/canvas-util' @@ -17,6 +17,7 @@ export const usePolygon = () => { const lengthTextFontOptions = useRecoilValue(fontSelector('lengthText')) const currentAngleType = useRecoilValue(currentAngleTypeSelector) const pitchText = useRecoilValue(pitchTextSelector) + const globalPitch = useRecoilValue(globalPitchState) const { getLengthByLine } = useLine() @@ -1337,7 +1338,7 @@ export const usePolygon = () => { defense = 'south' break } - pitch = polygon.lines[index]?.attributes?.pitch ?? representLine?.attributes?.pitch ?? 0 + pitch = polygon.lines[index]?.attributes?.pitch ?? representLine?.attributes?.pitch ?? globalPitch const roof = new QPolygon(roofPoint, { fontSize: polygon.fontSize,