diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 111 |
1 files changed, 0 insertions, 111 deletions
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<Partial<collection } return segments; - - // var deletedSegments = []; - // for (var i = 0; i < inkData.length - 3; i += 4) { - // const segmentStartT = Math.floor(i/4); - // const inkSegment: Bezier = InkField.Segment(inkData, i); - // const tVals: number[] = this.getInkIntersections(i, ink, inkSegment).sort(); - - // if (excludeT > 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<Partial<collection // if (segment2.length && (Math.abs(segment2[0].points[0].x - segment2[0].points.lastElement().x) > 0.5 || Math.abs(segment2[0].points[0].y - segment2[0].points.lastElement().y) > 0.5)) { // segments.push(segment2); // } - return segments; }; /** |