fix for poly.union(). needs benchmarking and verification. roll back depth first change

This commit is contained in:
Stewart Allen 2020-11-04 01:00:05 -05:00
commit 74df1f946a
3 changed files with 14 additions and 5 deletions

View file

@ -1064,8 +1064,8 @@
// - it has more than one sibling
// - it has no parent (top/outer most)
// - it is offset from its parent by more than diameter
// if (poly.isOpen() || !poly.parent || poly.parent.innerCount() > 1 || !polygonWithinOffset(poly, poly.parent, offset)) {
if (poly.depth === 0) {
if (poly.isOpen() || !poly.parent || poly.parent.innerCount() > 1 || !polygonWithinOffset(poly, poly.parent, offset)) {
// if (poly.depth === 0) {
pools.push(poly);
poly.pool = [];
poly.poolsDown = [];