|
@@ -359,7 +359,7 @@ function compareX( a, b ) {
|
|
|
|
|
|
}
|
|
|
|
|
|
-// find a bridge between vertices that connects hole with an outer ring and and link it
|
|
|
+// find a bridge between vertices that connects hole with an outer ring and link it
|
|
|
function eliminateHole( hole, outerNode ) {
|
|
|
|
|
|
outerNode = findHoleBridge( hole, outerNode );
|
|
@@ -591,7 +591,7 @@ function pointInTriangle( ax, ay, bx, by, cx, cy, px, py ) {
|
|
|
// check if a diagonal between two polygon nodes is valid (lies in polygon interior)
|
|
|
function isValidDiagonal( a, b ) {
|
|
|
|
|
|
- return a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // dones't intersect other edges
|
|
|
+ return a.next.i !== b.i && a.prev.i !== b.i && ! intersectsPolygon( a, b ) && // doesn't intersect other edges
|
|
|
( locallyInside( a, b ) && locallyInside( b, a ) && middleInside( a, b ) && // locally visible
|
|
|
( area( a.prev, a, b.prev ) || area( a, b.prev, b ) ) || // does not create opposite-facing sectors
|
|
|
equals( a, b ) && area( a.prev, a, a.next ) > 0 && area( b.prev, b, b.next ) > 0 ); // special zero-length case
|