x가 전부 같거나, y가 전부 같은경우 제거
This commit is contained in:
parent
adc0c41a67
commit
937f2eb3fe
@ -303,7 +303,13 @@ export function removeDuplicatePolygons(polygons) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return uniquePolygons
|
// x가 전부 같거나, y가 전부 같은 경우 제거
|
||||||
|
return uniquePolygons.filter((polygon) => {
|
||||||
|
const xValues = polygon.map((point) => point.x)
|
||||||
|
const yValues = polygon.map((point) => point.y)
|
||||||
|
|
||||||
|
return !(xValues.every((x) => x === xValues[0]) || yValues.every((y) => y === yValues[0]))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isSamePoint = (a, b) => {
|
export const isSamePoint = (a, b) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user