dev #494
@ -349,7 +349,7 @@ let fileCheck = false;
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{getMessage('qna.list.header.regNm')}</th>
|
||||
<td><input type="text" className="input-light" value={sessionState?.custNm || ''} readOnly /></td>
|
||||
<td><input type="text" className="input-light" value={sessionState?.userNm || ''} readOnly /></td>
|
||||
<th>E-Mail<span className="red">*</span></th>
|
||||
<td ><input type="text" className="input-light" required
|
||||
ref={qstMail}
|
||||
@ -362,6 +362,8 @@ let fileCheck = false;
|
||||
<td>{dayjs(new Date()).format('YYYY-MM-DD')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Customer</th>
|
||||
<td><input type="text" className="input-light" value={sessionState?.custNm || ''} readOnly /></td>
|
||||
<th>{getMessage('qna.reg.header.regUserNm')}<span className="red">*</span></th>
|
||||
<td ><input type="text" className="input-light" required
|
||||
ref={regUserNmRef}
|
||||
@ -369,7 +371,7 @@ let fileCheck = false;
|
||||
onChange={(e) => setQnaData({...qnaData, regUserNm: e.target.value })}
|
||||
onBlur={(e) => setQnaData({ ...qnaData, regUserNm: e.target.value })} /> </td>
|
||||
<th>{getMessage('qna.reg.header.regUserTelNo')}</th>
|
||||
<td colSpan={3}><input type="text" className="input-light"
|
||||
<td ><input type="text" className="input-light"
|
||||
ref={regUserTelNoRef}
|
||||
maxLength={13}
|
||||
value={qnaData?.regUserTelNo || '' }
|
||||
|
||||
@ -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 { calculateAngle, drawGableRoof, drawRidgeRoof, drawShedRoof, toGeoJSON } from '@/util/qpolygon-utils'
|
||||
import { calculateAngle, drawGableRoof, drawRoofByAttribute, drawShedRoof, toGeoJSON } from '@/util/qpolygon-utils'
|
||||
import * as turf from '@turf/turf'
|
||||
import { LINE_TYPE, POLYGON_TYPE } from '@/common/common'
|
||||
import Big from 'big.js'
|
||||
@ -314,14 +314,18 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
|
||||
}
|
||||
|
||||
const getParallelEavesLines = function (shedLines, lines) {
|
||||
const eavesLines = lines.filter((line) => line.attributes?.type === LINE_TYPE.WALLLINE.EAVES)
|
||||
|
||||
const referenceAngle = calculateAngle(shedLines[0].startPoint, shedLines[0].endPoint)
|
||||
|
||||
return eavesLines.filter((line) => {
|
||||
const eavesAngle = calculateAngle(line.startPoint, line.endPoint)
|
||||
return Math.abs(referenceAngle - eavesAngle) === 180
|
||||
const otherSideLines = lines.filter((line) => {
|
||||
const lineAngle = calculateAngle(line.startPoint, line.endPoint)
|
||||
return Math.abs(referenceAngle - lineAngle) === 180
|
||||
})
|
||||
const containNotEaves = otherSideLines.filter((line) => line.attributes?.type !== LINE_TYPE.WALLLINE.EAVES)
|
||||
|
||||
if (containNotEaves.length === 0) {
|
||||
return otherSideLines
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
const parallelEaves = getParallelEavesLines(shedLines, lines)
|
||||
@ -337,7 +341,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
|
||||
// 용마루 -- straight-skeleton
|
||||
console.log('용마루 지붕')
|
||||
///drawRidgeRoof(this.id, this.canvas, textMode)
|
||||
drawSkeletonRidgeRoof(this.id, this.canvas, textMode);
|
||||
drawSkeletonRidgeRoof(this.id, this.canvas, textMode)
|
||||
} else if (isGableRoof(types)) {
|
||||
// A형, B형 박공 지붕
|
||||
console.log('패턴 지붕')
|
||||
@ -347,7 +351,7 @@ export const QPolygon = fabric.util.createClass(fabric.Polygon, {
|
||||
drawShedRoof(this.id, this.canvas, textMode)
|
||||
} else {
|
||||
console.log('변별로 설정')
|
||||
drawRidgeRoof(this.id, this.canvas, textMode)
|
||||
drawRoofByAttribute(this.id, this.canvas, textMode)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user