Skip to content

Commit 31f1d90

Browse files
authored
Merge branch 'main' into Parts-inside
2 parents e5b410f + c268a47 commit 31f1d90

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class BuildingShapeUtils extends ShapeUtils {
2424
const elements = way.getElementsByTagName('nd');
2525

2626
// Get the coordinates of all the nodes and add them to the shape outline.
27-
2827
for (const element of elements) {
2928
ref = element.getAttribute('ref');
3029
nodes.push(nodelist[ref]);

test/utils.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ rectangle.lineTo(-4.332738077015795, 5.88221335051411);
127127
rectangle.lineTo(4.332747472106493, 5.88221335051411);
128128
rectangle.lineTo(4.332747472106493, -5.882209888874915);
129129

130+
const rectangle = new Shape();
131+
rectangle.moveTo(-4.332738077015795, -5.882209888874915);
132+
rectangle.lineTo(-4.332738077015795, 5.88221335051411);
133+
rectangle.lineTo(4.332747472106493, 5.88221335051411);
134+
rectangle.lineTo(4.332747472106493, -5.882209888874915);
135+
rectangle.lineTo(-4.332738077015795, -5.882209888874915);
136+
130137
test('Extents no Rotation', () => {
131138
expect(BuildingShapeUtils.extents(rightTriangle)).toStrictEqual([-1, -1, 1, 1]);
132139
});

0 commit comments

Comments
 (0)