Merge branch 'feature/design-remake' into dev
This commit is contained in:
commit
252782f275
@ -2957,11 +2957,12 @@ export const drawRoofByAttribute = (roofId, canvas, textMode) => {
|
||||
ridgePoint.x2 += pointVector.x * offset
|
||||
ridgePoint.y2 += pointVector.y * offset
|
||||
}
|
||||
} else {
|
||||
ridgePoint.x2 += pointVector.x * offset
|
||||
ridgePoint.y2 += pointVector.y * offset
|
||||
}
|
||||
} else {
|
||||
ridgePoint.x2 += pointVector.x * offset
|
||||
ridgePoint.y2 += pointVector.y * offset
|
||||
}
|
||||
// }
|
||||
} else if (drivePoint) {
|
||||
ridgePoint.x2 = drivePoint.x
|
||||
ridgePoint.y2 = drivePoint.y
|
||||
@ -3398,8 +3399,18 @@ export const drawRoofByAttribute = (roofId, canvas, textMode) => {
|
||||
default:
|
||||
break
|
||||
}
|
||||
point[2] += pointVector.x * offset
|
||||
point[3] += pointVector.y * offset
|
||||
if (oppLine.attributes.type === LINE_TYPE.WALLLINE.EAVES) {
|
||||
if (drivePoint) {
|
||||
point[2] = drivePoint.x
|
||||
point[3] = drivePoint.y
|
||||
} else {
|
||||
point[2] += pointVector.x * offset
|
||||
point[3] += pointVector.y * offset
|
||||
}
|
||||
} else {
|
||||
point[2] += pointVector.x * offset
|
||||
point[3] += pointVector.y * offset
|
||||
}
|
||||
} else if (drivePoint) {
|
||||
point[2] = drivePoint.x
|
||||
point[3] = drivePoint.y
|
||||
@ -4316,8 +4327,8 @@ export const drawRoofByAttribute = (roofId, canvas, textMode) => {
|
||||
|
||||
const intersect = lineIntersection(currLine.start, currLine.end, nextLine.start, nextLine.end, canvas)
|
||||
if (intersect) {
|
||||
const checkCircle = new fabric.Circle({ left: intersect.x, top: intersect.y, radius: 5, fill: 'blue', parentId: roofId, name: 'check' })
|
||||
canvas.add(checkCircle).renderAll()
|
||||
/*const checkCircle = new fabric.Circle({ left: intersect.x, top: intersect.y, radius: 5, fill: 'blue', parentId: roofId, name: 'check' })
|
||||
canvas.add(checkCircle).renderAll()*/
|
||||
let distance1 = Math.sqrt(Math.pow(intersect.x - currLine.start.x, 2) + Math.pow(intersect.y - currLine.start.y, 2))
|
||||
let distance2 = Math.sqrt(Math.pow(intersect.x - nextLine.start.x, 2) + Math.pow(intersect.y - nextLine.start.y, 2))
|
||||
let point = [currLine.start.x, currLine.start.y, intersect.x, intersect.y]
|
||||
@ -4799,13 +4810,17 @@ export const drawRoofByAttribute = (roofId, canvas, textMode) => {
|
||||
allLinesPoints.filter((p) => almostEqual(p.x, line.start.x) && almostEqual(p.y, line.start.y)).length < 3 &&
|
||||
allLinesPoints.filter((p) => almostEqual(p.x, line.end.x) && almostEqual(p.y, line.end.y)).length === 0
|
||||
) {
|
||||
if (startOnLine && endOnLine) {
|
||||
if (line.degree === 0) {
|
||||
innerLines.push(drawRoofLine([line.start.x, line.start.y, line.end.x, line.end.y], canvas, roof, textMode))
|
||||
} else {
|
||||
innerLines.push(
|
||||
drawHipLine([line.start.x, line.start.y, line.end.x, line.end.y], canvas, roof, textMode, null, line.degree, line.degree),
|
||||
)
|
||||
if (line.type === TYPES.RIDGE && baseLines.length === 4 && (startOnLine || endOnLine)) {
|
||||
innerLines.push(drawRidgeLine([line.start.x, line.start.y, line.end.x, line.end.y], canvas, roof, textMode))
|
||||
} else {
|
||||
if (startOnLine && endOnLine) {
|
||||
if (line.degree === 0) {
|
||||
innerLines.push(drawRoofLine([line.start.x, line.start.y, line.end.x, line.end.y], canvas, roof, textMode))
|
||||
} else {
|
||||
innerLines.push(
|
||||
drawHipLine([line.start.x, line.start.y, line.end.x, line.end.y], canvas, roof, textMode, null, line.degree, line.degree),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user