- 일변전으로 돌아가기 시 active color 수정
This commit is contained in:
parent
31dd93e0d8
commit
a60de83961
@ -26,10 +26,20 @@ export function useRoofLinePropertySetting(props) {
|
||||
|
||||
useEffect(() => {
|
||||
if (currentObject && currentObject.name === 'roofLine') {
|
||||
roof.lines.forEach((line) => {
|
||||
const lineType = line.attributes?.type
|
||||
if (!lineType) {
|
||||
line.set({
|
||||
stroke: '#000000',
|
||||
strokeWidth: 4,
|
||||
})
|
||||
}
|
||||
})
|
||||
currentObject.set({
|
||||
stroke: LINE_COLOR.ACTIVE,
|
||||
strokeWidth: 4,
|
||||
})
|
||||
canvas.renderAll()
|
||||
}
|
||||
}, [currentObject])
|
||||
|
||||
@ -98,11 +108,8 @@ export function useRoofLinePropertySetting(props) {
|
||||
}
|
||||
const lastLine = history.current.pop()
|
||||
|
||||
// delete lastLine.attributes
|
||||
lastLine.attributes = {
|
||||
...lastLine.attributes,
|
||||
type: null,
|
||||
}
|
||||
delete lastLine.attributes
|
||||
|
||||
lastLine.set({
|
||||
stroke: LINE_COLOR.DEFAULT,
|
||||
strokeWidth: 4,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user