Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hasSelfIntersection() {
// check for self intersection of the layer and return true/false
const selfIntersection = kinks(this._layer.toGeoJSON(15));
return selfIntersection.features.length > 0;
},
hasSelfIntersection() {
// check for self intersection of the layer and return true/false
const selfIntersection = kinks(this._layer.toGeoJSON(15));
return selfIntersection.features.length > 0;
},
_syncHintLine() {
if (flash) {
layer.setStyle({ color: 'red' });
this.isRed = true;
window.setTimeout(() => {
layer.setStyle({ color: this.cachedColor });
this.isRed = false;
}, 200);
} else {
layer.setStyle({ color: 'red' });
this.isRed = true;
}
// fire intersect event
this._layer.fire('pm:intersect', {
intersection: kinks(this._layer.toGeoJSON(15)),
});
} else {
// if not, reset the style to the default color
layer.setStyle({ color: this.cachedColor });
this.isRed = false;
}
},