From 3c6707abda0054335a4924a453b945bb87723a59 Mon Sep 17 00:00:00 2001 From: eleanor-park Date: Sun, 31 Mar 2024 14:13:35 -0400 Subject: some cleanup --- .../collectionFreeForm/CollectionFreeFormView.tsx | 111 --------------------- 1 file changed, 111 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index b8d74dff2..18b75d8ff 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -961,116 +961,6 @@ export class CollectionFreeFormView extends CollectionSubView segmentStartT && excludeT < segmentStartT + 1) { - // if (tVals.length) { - // const closestTs = this.getClosestTs(tVals, excludeT, 0, tVals.length - 1); - // if (closestTs[0] != -1 && closestTs[1] != -1) { - // segment1.push(inkSegment.split(0, closestTs[0])); - // segment2.push(inkSegment.split(closestTs[1]).right); - // deletedSegments.push(inkSegment.split(closestTs[0], closestTs[1])); - // } else if (closestTs[0] == -1) { - // segment2.push(inkSegment.split(closestTs[1]).right); - // deletedSegments.push(inkSegment.split(closestTs[1]).left); - // if (excludeT > tVals[0]) { - // continueErasing = !continueErasing; - // } - // } else { - // continueErasing ? segment2.push(inkSegment.split(closestTs[0]).right) : segment1.push(inkSegment.split(0, closestTs[0])); - // continueErasing ? deletedSegments.push(inkSegment.split(closestTs[0]).left) : deletedSegments.push(inkSegment.split(closestTs[0]).right); - // continueErasing = !continueErasing; - // } - // if (!continueErasing) { - // hasSplit = true; - // } - // } else if (hasSplit) { - // segment2.push(inkSegment); - // } else { - // continueErasing = true; - // } - // } else { - // hasSplit ? segment1.push(inkSegment) : segment2.push(inkSegment); - // } - - // if (tVals.length) { - // if (!hasSplit) { - // if (excludeT <= tVals[0] || (excludeT > tVals[0] && excludeT < tVals.lastElement()) || excludeT > tVals.lastElement() || continueErasing) { - // const closestTs = this.getClosestTs(tVals, excludeT, 0, tVals.length - 1); - // if (closestTs[0] != -1 && closestTs[1] != -1) { - // segment1.push(inkSegment.split(0, closestTs[0])); - // segment2.push(inkSegment.split(closestTs[1]).right); - // deletedSegments.push(inkSegment.split(closestTs[0], closestTs[1])); - // } else if (closestTs[0] == -1) { - // segment2.push(inkSegment.split(closestTs[1]).right); - // deletedSegments.push(inkSegment.split(closestTs[1]).left); - // if (excludeT > tVals[0]) { - // continueErasing = !continueErasing; - // } - // } else { - // continueErasing ? segment2.push(inkSegment.split(closestTs[0]).right) : segment1.push(inkSegment.split(0, closestTs[0])); - // continueErasing ? deletedSegments.push(inkSegment.split(closestTs[0]).left) : deletedSegments.push(inkSegment.split(closestTs[0]).right); - // continueErasing = !continueErasing; - // } - // if (!continueErasing) { - // hasSplit = true; - // } - // } else { - // if (hasSplit) { - // segment2.push(inkSegment); - // } else { - // segment1.push(inkSegment); - // } - // } - // } else if (excludeT > tVals[0] && excludeT < tVals.lastElement()) { - // // here we know hasSplit is true (but it shouldnt be!) - // segment1 = [...deletedSegments]; - // deletedSegments = []; - // hasSplit = false; - // const closestTs = this.getClosestTs(tVals, excludeT, 0, tVals.length - 1); - // if (closestTs[0] != -1 && closestTs[1] != -1) { - // segment1.push(inkSegment.split(0, closestTs[0])); - // segment2.push(inkSegment.split(closestTs[1]).right); - // } else if (closestTs[0] == -1) { - // segment2.push(inkSegment.split(closestTs[1]).right); - // if (excludeT > tVals[0]) { - // continueErasing = !continueErasing; - // } - // } - // } else { - // segment2.push(inkSegment); - // } - // } else if (hasSplit) { - // segment2.push(inkSegment); - // } else { - // continueErasing = true; - // } - - - - - // if (hasSplit && i + 4 >= lastIteration && ((excludeT > tVals[0] && excludeT < tVals.lastElement()) || (excludeT > tVals.lastElement()))) { - // // here we know hasSplit is true (but it shouldnt be!) - // segment1 = [...deletedSegments]; - // deletedSegments = []; - // hasSplit = false; - // const closestTs = this.getClosestTs(tVals, excludeT, 0, tVals.length - 1); - // if (closestTs[0] != -1 && closestTs[1] != -1) { - // segment1.push(inkSegment.split(0, closestTs[0])); - // segment2.push(inkSegment.split(closestTs[1]).right); - // } else if (closestTs[0] == -1) { - // segment2.push(inkSegment.split(closestTs[1]).right); - // if (excludeT > tVals[0]) { - // continueErasing = !continueErasing; - // } - // } - // } - // } // const segments: Segment[] = []; @@ -1122,7 +1012,6 @@ export class CollectionFreeFormView extends CollectionSubView 0.5 || Math.abs(segment2[0].points[0].y - segment2[0].points.lastElement().y) > 0.5)) { // segments.push(segment2); // } - return segments; }; /** -- cgit v1.2.3-70-g09d2