globalPitch 추가
This commit is contained in:
parent
984836d523
commit
cc7f1ad6af
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user