From 19f0555e48d680d4e2f948ca2d019014e79d41e4 Mon Sep 17 00:00:00 2001 From: Chris Carmichael Date: Tue, 4 Jun 2024 16:46:08 -0300 Subject: [PATCH] feat: add hasPoint function to GraphPoints --- src/data/GraphPoints.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/data/GraphPoints.ts b/src/data/GraphPoints.ts index 0b2cb4f..f2ca4ea 100755 --- a/src/data/GraphPoints.ts +++ b/src/data/GraphPoints.ts @@ -120,6 +120,10 @@ export class GraphPoints extends DataTexture { ]; } + public hasPoint(id: number | string): boolean { + return this.map.has(id); + } + public getPointByID(id: number | string): [number, number, number, number] { return this.getPointByIndex(this.getPointIndex(id)); }