- 회로번호 폰트 적용
This commit is contained in:
parent
b2df12c438
commit
4ed0ea1964
@ -14,6 +14,7 @@ import { globalLocaleStore } from '@/store/localeAtom'
|
||||
import { POLYGON_TYPE } from '@/common/common'
|
||||
import { useSwal } from '@/hooks/useSwal'
|
||||
import { circuitNumDisplaySelector } from '@/store/settingAtom'
|
||||
import { fontSelector } from '@/store/fontAtom'
|
||||
|
||||
export default function StepUp(props) {
|
||||
const {
|
||||
@ -47,6 +48,7 @@ export default function StepUp(props) {
|
||||
// 선택된 값들을 저장할 상태 추가
|
||||
const [selectedValues, setSelectedValues] = useState({})
|
||||
const isDisplayCircuitNumber = useRecoilValue(circuitNumDisplaySelector)
|
||||
const circuitNumberText = useRecoilValue(fontSelector('circuitNumberText'))
|
||||
// useCanvasPopupStatusController(6)
|
||||
// const canvasPopupStatusState = useRecoilValue(canvasPopupStatusStore)
|
||||
// if (Object.keys(canvasPopupStatusState[6]).length !== 0) {
|
||||
@ -112,7 +114,11 @@ export default function StepUp(props) {
|
||||
left: targetModule.left + targetModule.width / 2,
|
||||
top: targetModule.top + targetModule.height / 2,
|
||||
fill: 'black',
|
||||
fontSize: 20,
|
||||
fontFamily: circuitNumberText.fontFamily.value,
|
||||
fontWeight: circuitNumberText.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
|
||||
fontStyle: circuitNumberText.fontWeight.value.toLowerCase().includes('italic') ? 'italic' : 'normal',
|
||||
fontSize: circuitNumberText.fontSize.value,
|
||||
fill: circuitNumberText.fontColor.value,
|
||||
width: targetModule.width,
|
||||
height: targetModule.height,
|
||||
textAlign: 'center',
|
||||
@ -421,7 +427,7 @@ export default function StepUp(props) {
|
||||
roofSurface.moduleList.forEach((module) => {
|
||||
const targetModule = canvas.getObjects().filter((obj) => obj.id === module.uniqueId)[0]
|
||||
if (module.circuit === '') return
|
||||
const moduleCircuitText = new fabric.Text(module.circuit, {
|
||||
const moduleCircuitText = new fabricxtxt(module.circuit, {
|
||||
left: targetModule.left + targetModule.width / 2,
|
||||
top: targetModule.top + targetModule.height / 2,
|
||||
fill: 'black',
|
||||
|
||||
@ -7,6 +7,7 @@ import { useMessage } from '@/hooks/useMessage'
|
||||
import { useSwal } from '@/hooks/useSwal'
|
||||
import { canvasState } from '@/store/canvasAtom'
|
||||
import { moduleStatisticsState } from '@/store/circuitTrestleAtom'
|
||||
import { fontSelector } from '@/store/fontAtom'
|
||||
import { selectedModuleState } from '@/store/selectedModuleOptions'
|
||||
import { circuitNumDisplaySelector } from '@/store/settingAtom'
|
||||
import { useContext, useEffect, useState } from 'react'
|
||||
@ -32,7 +33,8 @@ export default function PassivityCircuitAllocation(props) {
|
||||
const { getPcsManualConfChk } = useMasterController()
|
||||
const isDisplayCircuitNumber = useRecoilValue(circuitNumDisplaySelector)
|
||||
const { setModuleStatisticsData } = useCircuitTrestle()
|
||||
|
||||
const circuitNumberText = useRecoilValue(fontSelector('circuitNumberText'))
|
||||
|
||||
useEffect(() => {
|
||||
setModuleStatisticsData()
|
||||
if (!managementState) {
|
||||
@ -133,7 +135,10 @@ export default function PassivityCircuitAllocation(props) {
|
||||
left: obj.left + obj.width / 2,
|
||||
top: obj.top + obj.height / 2,
|
||||
fill: 'black',
|
||||
fontSize: 20,
|
||||
fontFamily: circuitNumberText.fontFamily.value,
|
||||
fontWeight: circuitNumberText.fontWeight.value.toLowerCase().includes('bold') ? 'bold' : 'normal',
|
||||
fontStyle: circuitNumberText.fontWeight.value.toLowerCase().includes('italic') ? 'italic' : 'normal',
|
||||
fontSize: circuitNumberText.fontSize.value,
|
||||
width: obj.width,
|
||||
height: obj.height,
|
||||
textAlign: 'center',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user