From 5cdefcda0bada2bde23652ec9ffae2c50e9843cb Mon Sep 17 00:00:00 2001 From: streamich Date: Fri, 19 Apr 2024 12:34:31 +0200 Subject: [PATCH] =?UTF-8?q?chore(json-crdt-extensions):=20=F0=9F=A4=96=20c?= =?UTF-8?q?leanup=20Point=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/json-crdt-extensions/peritext/point/Point.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/json-crdt-extensions/peritext/point/Point.ts b/src/json-crdt-extensions/peritext/point/Point.ts index 04c3250aa8..aa0821745f 100644 --- a/src/json-crdt-extensions/peritext/point/Point.ts +++ b/src/json-crdt-extensions/peritext/point/Point.ts @@ -58,8 +58,6 @@ export class Point implements Pick, Printable { * @returns Returns 0 if the two points are equal, -1 if this point is less * than the other point, and 1 if this point is greater than the other * point. - * - * @todo Rename to `cmp`. */ public cmp(other: Point): -1 | 0 | 1 { const cmp = compare(this.id, other.id); @@ -76,8 +74,6 @@ export class Point implements Pick, Printable { * @returns Returns 0 if the two points are equal, negative if this point is * less than the other point, and positive if this point is greater * than the other point. - * - * @todo Rename to `cmpSpatial`. */ public cmpSpatial(other: Point): number { const thisId = this.id; @@ -135,15 +131,6 @@ export class Point implements Pick, Printable { return pos + this.id.time - chunk.id.time; } - private _pos: number = -1; - - /** @todo Is this needed? */ - public posCached(): number { - if (this._pos >= 0) return this._pos; - const pos = (this._pos = this.pos()); - return pos; - } - /** * @returns Returns the view position of the point, as if it is a caret in * the text pointing between characters.