I was playing around with this lib and stuck with error that on this line
if (t.containsPoint(this.poly.end)) {
t is undefined It's because method private getSleeve(sourceTriangle: Tr) gets sourceTriangle === undefined. Looking in code I found that this method used only ones
const sleeve: FrontEdge[] = this.getSleeve(this.findSourceTriangle(localCdt))
if (sleeve == null) {
so result of this method could be null or undefined and I decided to add check for sourceTriangle like
private getSleeve(sourceTriangle: Tr): FrontEdge[] {
if (!sourceTriangle) return;
and error gone
Why this.findSourceTriangle(localCdt) returns undefined I don't know, but I can give you my graph in json and code how I use it.
Good day
I was playing around with this lib and stuck with error that on this line
t is undefined
It's because methodprivate getSleeve(sourceTriangle: Tr)
getssourceTriangle === undefined
. Looking in code I found that this method used only onesso result of this method could be
null
orundefined
and I decided to add check forsourceTriangle
likeand error gone
Why
this.findSourceTriangle(localCdt)
returnsundefined
I don't know, but I can give you my graph in json and code how I use it.