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