지붕형상 수동 설정- 일변전으로돌아가기 클릭 시 오류 수정
This commit is contained in:
parent
ba32deeb99
commit
37e3b940e5
@ -35,10 +35,6 @@ export const QLine = fabric.util.createClass(fabric.Line, {
|
|||||||
|
|
||||||
this.startPoint = { x: this.x1, y: this.y1 }
|
this.startPoint = { x: this.x1, y: this.y1 }
|
||||||
this.endPoint = { x: this.x2, y: this.y2 }
|
this.endPoint = { x: this.x2, y: this.y2 }
|
||||||
|
|
||||||
if (canvas) {
|
|
||||||
this.canvas = canvas
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
init: function () {
|
init: function () {
|
||||||
|
|||||||
@ -88,10 +88,10 @@ export function useRoofShapePassivitySetting(id) {
|
|||||||
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
|
const lines = canvas.getObjects().filter((obj) => obj.name === 'outerLine')
|
||||||
let stroke, strokeWidth
|
let stroke, strokeWidth
|
||||||
lines.forEach((line) => {
|
lines.forEach((line) => {
|
||||||
if (line.attributes.type === LINE_TYPE.WALLLINE.EAVES || line.attributes.type === LINE_TYPE.WALLLINE.HIPANDGABLE) {
|
if (line.attributes?.type === LINE_TYPE.WALLLINE.EAVES || line.attributes?.type === LINE_TYPE.WALLLINE.HIPANDGABLE) {
|
||||||
stroke = '#45CD7D'
|
stroke = '#45CD7D'
|
||||||
strokeWidth = 4
|
strokeWidth = 4
|
||||||
} else if (line.attributes.type === LINE_TYPE.WALLLINE.GABLE || line.attributes.type === LINE_TYPE.WALLLINE.JERKINHEAD) {
|
} else if (line.attributes?.type === LINE_TYPE.WALLLINE.GABLE || line.attributes?.type === LINE_TYPE.WALLLINE.JERKINHEAD) {
|
||||||
stroke = '#3FBAE6'
|
stroke = '#3FBAE6'
|
||||||
strokeWidth = 4
|
strokeWidth = 4
|
||||||
} else {
|
} else {
|
||||||
@ -136,7 +136,7 @@ export function useRoofShapePassivitySetting(id) {
|
|||||||
const index = lines.findIndex((line) => line === selectedLine)
|
const index = lines.findIndex((line) => line === selectedLine)
|
||||||
|
|
||||||
const nextLine = lines[index + 1] || lines[0]
|
const nextLine = lines[index + 1] || lines[0]
|
||||||
if (nextLine.attributes.isFixed) {
|
if (nextLine.attributes?.isFixed) {
|
||||||
canvas.discardActiveObject()
|
canvas.discardActiveObject()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user