abs()삭제
This commit is contained in:
parent
8c3f81870a
commit
7e13cb20a3
@ -1057,8 +1057,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
|
|
||||||
if (isStartEnd.end) {
|
if (isStartEnd.end) {
|
||||||
const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber()
|
const moveDist = Big(wallLine.x1).minus(wallBaseLine.x1).abs().toNumber()
|
||||||
const aStartY = Big(roofLine.y2).minus(moveDist).abs().toNumber()
|
const aStartY = Big(roofLine.y2).minus(moveDist).toNumber()
|
||||||
const bStartY = Big(wallLine.y2).minus(moveDist).abs().toNumber()
|
const bStartY = Big(wallLine.y2).minus(moveDist).toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { y: aStartY, x: roofLine.x1 })
|
const inLine = findLineContainingPoint(innerLines, { y: aStartY, x: roofLine.x1 })
|
||||||
console.log('startLines:::::::', inLine)
|
console.log('startLines:::::::', inLine)
|
||||||
const eLineY = Big(bStartY).minus(wallLine.y2).abs().toNumber()
|
const eLineY = Big(bStartY).minus(wallLine.y2).abs().toNumber()
|
||||||
@ -1168,7 +1168,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
const newPointY = Big(roofLine.y1).plus(moveDist).toNumber()
|
const newPointY = Big(roofLine.y1).plus(moveDist).toNumber()
|
||||||
|
|
||||||
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
|
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
|
||||||
const pLineX = Big(roofLine.x2).minus(0).abs().toNumber()
|
const pLineX = Big(roofLine.x2).minus(0).toNumber()
|
||||||
|
|
||||||
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
||||||
// const pLineY = sortRoofLines[idx + 1].y2
|
// const pLineY = sortRoofLines[idx + 1].y2
|
||||||
@ -1244,11 +1244,11 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
}
|
}
|
||||||
if (isStartEnd.end) {
|
if (isStartEnd.end) {
|
||||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||||
const aStartX = Big(roofLine.x2).minus(moveDist).abs().toNumber()
|
const aStartX = Big(roofLine.x2).minus(moveDist).toNumber()
|
||||||
const bStartX = Big(wallLine.x2).minus(moveDist).abs().toNumber()
|
const bStartX = Big(wallLine.x2).minus(moveDist).toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: newPEnd.y })
|
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: newPEnd.y })
|
||||||
console.log('startLines:::::::', inLine)
|
console.log('startLines:::::::', inLine)
|
||||||
const eLineX = Big(bStartX).minus(wallLine.x2).abs().toNumber()
|
const eLineX = Big(bStartX).minus(wallLine.x2).toNumber()
|
||||||
newPStart.x = roofLine.x1 //Big(newPStart.x).minus(eLineX).abs().toNumber()
|
newPStart.x = roofLine.x1 //Big(newPStart.x).minus(eLineX).abs().toNumber()
|
||||||
newPEnd.x = aStartX
|
newPEnd.x = aStartX
|
||||||
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
||||||
@ -1304,7 +1304,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
const newPointY = Big(roofLine.y2).minus(moveDist).toNumber()
|
const newPointY = Big(roofLine.y2).minus(moveDist).toNumber()
|
||||||
|
|
||||||
const pDist = Big(wallLine.y2).minus(roofLine.y2).abs().toNumber()
|
const pDist = Big(wallLine.y2).minus(roofLine.y2).abs().toNumber()
|
||||||
const pLineX = Big(roofLine.x1).minus(0).abs().toNumber()
|
const pLineX = Big(roofLine.x1).minus(0).toNumber()
|
||||||
|
|
||||||
// let idx = 0 > index - 1 ? sortRoofLines.length : index
|
// let idx = 0 > index - 1 ? sortRoofLines.length : index
|
||||||
// const pLineY = sortRoofLines[idx - 1].y1
|
// const pLineY = sortRoofLines[idx - 1].y1
|
||||||
@ -1331,7 +1331,7 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
const newPointY = Big(roofLine.y1).minus(moveDist).toNumber()
|
const newPointY = Big(roofLine.y1).minus(moveDist).toNumber()
|
||||||
|
|
||||||
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
|
const pDist = Big(wallLine.y1).minus(roofLine.y1).abs().toNumber()
|
||||||
const pLineX = Big(roofLine.x2).minus(0).abs().toNumber()
|
const pLineX = Big(roofLine.x2).minus(0).toNumber()
|
||||||
|
|
||||||
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
// let idx = sortRoofLines.length < index + 1 ? 0 : index
|
||||||
// const pLineY = sortRoofLines[idx + 1].y2
|
// const pLineY = sortRoofLines[idx + 1].y2
|
||||||
@ -1354,8 +1354,8 @@ const createInnerLinesFromSkeleton = (roofId, canvas, skeleton, textMode) => {
|
|||||||
console.log('bottom_out isStartEnd:::::::', isStartEnd)
|
console.log('bottom_out isStartEnd:::::::', isStartEnd)
|
||||||
if (isStartEnd.start) {
|
if (isStartEnd.start) {
|
||||||
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
const moveDist = Big(wallLine.y1).minus(wallBaseLine.y1).abs().toNumber()
|
||||||
const aStartX = Big(roofLine.x1).minus(moveDist).abs().toNumber()
|
const aStartX = Big(roofLine.x1).minus(moveDist).toNumber()
|
||||||
const bStartX = Big(wallLine.x1).minus(moveDist).abs().toNumber()
|
const bStartX = Big(wallLine.x1).minus(moveDist).toNumber()
|
||||||
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: roofLine.y1 })
|
const inLine = findLineContainingPoint(innerLines, { x: aStartX, y: roofLine.y1 })
|
||||||
console.log('startLines:::::::', inLine)
|
console.log('startLines:::::::', inLine)
|
||||||
const eLineX = Big(bStartX).minus(wallLine.x1).abs().toNumber()
|
const eLineX = Big(bStartX).minus(wallLine.x1).abs().toNumber()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user