Merge branch 'qcast-pub' into dev
This commit is contained in:
commit
ef14d53250
@ -47,8 +47,14 @@ export function useRoofLinePropertySetting(props) {
|
||||
}
|
||||
}, [currentObject])
|
||||
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
canvas.remove(...canvas.getObjects().filter((obj) => obj.name === 'cloneRoofLine'))
|
||||
canvas.renderAll()
|
||||
}
|
||||
}, [])
|
||||
|
||||
const roofLinesInit = () => {
|
||||
console.log('🚀 ~ roofLinesInit ~ roof:', roof)
|
||||
roof.lines.forEach((line) => {
|
||||
line.clone((cloned) => {
|
||||
cloned.set({
|
||||
@ -62,6 +68,9 @@ export function useRoofLinePropertySetting(props) {
|
||||
})
|
||||
line.set({
|
||||
visible: false,
|
||||
attributes: {
|
||||
...line.attributes,
|
||||
},
|
||||
})
|
||||
canvas.add(cloned)
|
||||
cloned.bringToFront()
|
||||
@ -142,7 +151,6 @@ export function useRoofLinePropertySetting(props) {
|
||||
const handleFix = () => {
|
||||
// const roof = canvas.getObjects().find((obj) => currentObject.parentId === obj.id)
|
||||
// const notSettingLines = roof.lines.filter(
|
||||
console.log(canvas.getObjects().filter((obj) => obj.name === 'cloneRoofLine'))
|
||||
const notSettingLines = canvas
|
||||
.getObjects()
|
||||
.filter((obj) => obj.name === 'cloneRoofLine')
|
||||
@ -188,7 +196,6 @@ export function useRoofLinePropertySetting(props) {
|
||||
// const roof = canvas.getObjects().find((obj) => currentObject.parentId === obj.id)
|
||||
// const lines = roof?.lines
|
||||
const lines = canvas.getObjects().filter((obj) => obj.name === 'cloneRoofLine')
|
||||
console.log('🚀 ~ nextLineFocus ~ lines:', lines)
|
||||
|
||||
if (!lines) return
|
||||
const index = lines.findIndex((line) => line === selectedLine)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user