중복제거
This commit is contained in:
parent
e9b6624cb7
commit
eb71af3799
@ -575,7 +575,19 @@ export function useMovementSetting(id) {
|
|||||||
targetBaseLines.push({ line: target, distance: 0 })
|
targetBaseLines.push({ line: target, distance: 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
targetBaseLines.sort((a, b) => a.distance - b.distance)
|
// Remove duplicate lines
|
||||||
|
const uniqueLines = new Map();
|
||||||
|
targetBaseLines = targetBaseLines.filter(item => {
|
||||||
|
const key = `${item.line.x1},${item.line.y1},${item.line.x2},${item.line.y2}`;
|
||||||
|
if (!uniqueLines.has(key)) {
|
||||||
|
uniqueLines.set(key, true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sort by distance
|
||||||
|
targetBaseLines.sort((a, b) => a.distance - b.distance);
|
||||||
targetBaseLines = targetBaseLines.filter((line) => line.distance === targetBaseLines[0].distance)
|
targetBaseLines = targetBaseLines.filter((line) => line.distance === targetBaseLines[0].distance)
|
||||||
|
|
||||||
if (isGableRoof) {
|
if (isGableRoof) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user