File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,14 @@ class BuildingShapeUtils extends ShapeUtils {
6767 if ( BuildingShapeUtils . isClosed ( ways [ i ] ) ) {
6868 closedWays . push ( ways [ i ] ) ;
6969 } else {
70+ // These are HTMLCollections of nodes, not ways.
7071 const way1 = ways [ i ] . getElementsByTagName ( 'nd' ) ;
7172 const way2 = ways [ i + 1 ] . getElementsByTagName ( 'nd' ) ;
73+
74+ // If the first node of way2 is the same as the last in way one, they can be combined
75+ // Or if the first node of way1 is the same as the last in way2
76+ // Need to extend this to tip-to-tip connections as well.
77+ // Need to add a "reverse way" function somewhere.
7278 if ( way2 [ 0 ] . getAttribute ( 'ref' ) === way1 [ way1 . length - 1 ] . getAttribute ( 'ref' ) ) {
7379 const result = BuildingShapeUtils . joinWays ( ways [ i ] , ways [ i + 1 ] ) ;
7480 openWays . push ( result ) ;
You can’t perform that action at this time.
0 commit comments