기존 저장된 지붕재 index 수정
This commit is contained in:
parent
6f5b70342d
commit
de5901492b
@ -308,8 +308,17 @@ export function useRoofAllocationSetting(id) {
|
|||||||
*/
|
*/
|
||||||
const handleSaveContext = () => {
|
const handleSaveContext = () => {
|
||||||
const newRoofList = currentRoofList.map((roof, idx) => {
|
const newRoofList = currentRoofList.map((roof, idx) => {
|
||||||
|
if (roof.index !== idx) {
|
||||||
|
// 기존 저장된 지붕재의 index 수정
|
||||||
|
const roofs = canvas.getObjects().filter((obj) => obj.name === POLYGON_TYPE.ROOF && obj.roofMaterial?.index === roof.index)
|
||||||
|
roofs.forEach((roof) => {
|
||||||
|
setSurfaceShapePattern(roof, roofDisplay.column, false, { ...roof, index: idx }, true)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
return { ...roof, index: idx, raft: roof.raft ? roof.raft : roof.raftBaseCd }
|
return { ...roof, index: idx, raft: roof.raft ? roof.raft : roof.raftBaseCd }
|
||||||
})
|
})
|
||||||
|
|
||||||
setBasicSetting((prev) => {
|
setBasicSetting((prev) => {
|
||||||
return {
|
return {
|
||||||
...prev,
|
...prev,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user