offset 조건 수정
This commit is contained in:
parent
f24715b5d4
commit
9036502f2d
@ -14,7 +14,7 @@ import {
|
|||||||
} from '@/store/canvasAtom'
|
} from '@/store/canvasAtom'
|
||||||
|
|
||||||
import { rectToPolygon, polygonToTurfPolygon, calculateVisibleModuleHeight, getDegreeByChon, toFixedWithoutRounding } from '@/util/canvas-util'
|
import { rectToPolygon, polygonToTurfPolygon, calculateVisibleModuleHeight, getDegreeByChon, toFixedWithoutRounding } from '@/util/canvas-util'
|
||||||
import { roofDisplaySelector } from '@/store/settingAtom'
|
import { basicSettingState, roofDisplaySelector } from '@/store/settingAtom'
|
||||||
import offsetPolygon, { calculateAngle, createLinesFromPolygon } from '@/util/qpolygon-utils'
|
import offsetPolygon, { calculateAngle, createLinesFromPolygon } from '@/util/qpolygon-utils'
|
||||||
import { QPolygon } from '@/components/fabric/QPolygon'
|
import { QPolygon } from '@/components/fabric/QPolygon'
|
||||||
import { moduleSetupSurfaceState } from '@/store/canvasAtom'
|
import { moduleSetupSurfaceState } from '@/store/canvasAtom'
|
||||||
@ -52,6 +52,7 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
const [trestleDetailList, setTrestleDetailList] = useState([])
|
const [trestleDetailList, setTrestleDetailList] = useState([])
|
||||||
const selectedModules = useRecoilValue(selectedModuleState)
|
const selectedModules = useRecoilValue(selectedModuleState)
|
||||||
const [saleStoreNorthFlg, setSaleStoreNorthFlg] = useState(false)
|
const [saleStoreNorthFlg, setSaleStoreNorthFlg] = useState(false)
|
||||||
|
const roofSizeSet = useRecoilValue(basicSettingState).roofSizeSet
|
||||||
|
|
||||||
const setCurrentObject = useSetRecoilState(currentObjectState)
|
const setCurrentObject = useSetRecoilState(currentObjectState)
|
||||||
const { setModuleStatisticsData } = useCircuitTrestle()
|
const { setModuleStatisticsData } = useCircuitTrestle()
|
||||||
@ -198,9 +199,9 @@ export function useModuleBasicSetting(tabNum) {
|
|||||||
const calculateHeightRate = 1 / Math.cos((degree * Math.PI) / 180)
|
const calculateHeightRate = 1 / Math.cos((degree * Math.PI) / 180)
|
||||||
const calculateValue = calculateHeightRate / calculateExpression(degree)
|
const calculateValue = calculateHeightRate / calculateExpression(degree)
|
||||||
|
|
||||||
const eavesResult = from === 'roofCover' ? (data.eavesMargin * Math.cos((degree * Math.PI) / 180)) / 10 : data.eavesMargin / 10
|
const eavesResult = +roofSizeSet === 1 ? (data.eavesMargin * Math.cos((degree * Math.PI) / 180)) / 10 : data.eavesMargin / 10
|
||||||
const ridgeResult = from === 'roofCover' ? (data.ridgeMargin * Math.cos((degree * Math.PI) / 180)) / 10 : data.ridgeMargin / 10
|
const ridgeResult = +roofSizeSet === 1 ? (data.ridgeMargin * Math.cos((degree * Math.PI) / 180)) / 10 : data.ridgeMargin / 10
|
||||||
const kerabaMargin = from === 'roofCover' && isDiagonal ? data.kerabaMargin / calculateValue / 10 : data.kerabaMargin / 10
|
const kerabaMargin = +roofSizeSet === 1 && isDiagonal ? data.kerabaMargin / calculateValue / 10 : data.kerabaMargin / 10
|
||||||
|
|
||||||
switch (line.attributes.type) {
|
switch (line.attributes.type) {
|
||||||
case LINE_TYPE.WALLLINE.EAVES:
|
case LINE_TYPE.WALLLINE.EAVES:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user