Skip to content

Commit 7f04e39

Browse files
authored
Update BuildingShapeUtils.js
1 parent 05ad141 commit 7f04e39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ class BuildingShapeUtils extends ShapeUtils {
8585
openWays.push(result);
8686
i++;
8787
changed = true;
88-
} else if (way1[0].getAttribute('ref') === way2[0].getAttribute('ref')) {
89-
const tempway = BuildingShapeUtils.reverseWay(ways[i]);
90-
const result = BuildingShapeUtils.joinWays(tempway, ways[i + 1]);
91-
openWays.push(result);
92-
i++;
93-
changed = true;
9488
} else if (way1[way1.length - 1].getAttribute('ref') === way2[way2.length - 1].getAttribute('ref')) {
9589
const tempway = BuildingShapeUtils.reverseWay(ways[i + 1]);
9690
const result = BuildingShapeUtils.joinWays(ways[i], tempway);
9791
openWays.push(result);
9892
i++;
9993
changed = true;
94+
} else if (way1[0].getAttribute('ref') === way2[0].getAttribute('ref')) {
95+
const tempway = BuildingShapeUtils.reverseWay(ways[i]);
96+
const result = BuildingShapeUtils.joinWays(tempway, ways[i + 1]);
97+
openWays.push(result);
98+
i++;
99+
changed = true;
100100
} else {
101101
openWays.push(ways[i]);
102102
}

0 commit comments

Comments
 (0)