Refactor long line
This commit is contained in:
@@ -465,9 +465,13 @@
|
||||
const x2 = l.getAttribute('x2');
|
||||
const y2 = l.getAttribute('y2');
|
||||
const str = `${x1},${y1} ${x2},${y2}`;
|
||||
if (mappedEdges.includes(str) && (lineContainer.childElementCount < 4 || !collisionEdges.includes(str))) {
|
||||
|
||||
if (mappedEdges.includes(str))
|
||||
if ([
|
||||
lineContainer.childElementCount <= collisionEdges.length,
|
||||
!collisionEdges.includes(str)
|
||||
].some(c => c))
|
||||
l.remove();
|
||||
}
|
||||
});
|
||||
|
||||
if (restart) {
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Reference in New Issue
Block a user