@idm-plugin/geo 1.8.8 → 1.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1697,7 +1697,7 @@ class f {
1697
1697
  const q = { lng: z[o].lng, lat: z[o].lat }, Y = { lng: z[o + 1].lng, lat: z[o + 1].lat }, d = this.calculatePointToLineDistance(M, q, Y);
1698
1698
  p >= d && (p = d, c = o, O = this.calculateDistance(q, M, !1, 6), A = this.calculateDistance(Y, M, !1, 6));
1699
1699
  }
1700
- O !== 0 && A !== 0 ? O < p || O === p && c === 0 ? z.unshift(M) : A < p || A === p && c === z.length - 2 ? z.push(M) : z.splice(c + 1, 0, M) : O === 0 ? b ? z.splice(c, 1, M) : z.splice(c + 1, 0, M) : A === 0 && (b ? z.splice(c + 1, 1, M) : z.splice(c + 1, 0, M));
1700
+ O !== 0 && A !== 0 ? O <= p && c === 0 ? z.unshift(M) : A <= p && c === z.length - 2 ? z.push(M) : z.splice(c + 1, 0, M) : O === 0 ? b ? z.splice(c, 1, M) : z.splice(c + 1, 0, M) : A === 0 && (b ? z.splice(c + 1, 1, M) : z.splice(c + 1, 0, M));
1701
1701
  }
1702
1702
  return z.map((o, q) => {
1703
1703
  o.lng = X.convertToStdLng(o.lng);