From cc7c677399d1aafa4078741922ffcd0b81ad720f Mon Sep 17 00:00:00 2001 From: vkalev Date: Wed, 24 Nov 2021 12:45:50 -0500 Subject: segmentation of ink strokes prior to deletion --- src/fields/InkField.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/fields') diff --git a/src/fields/InkField.ts b/src/fields/InkField.ts index 1d50b5e0d..f61313674 100644 --- a/src/fields/InkField.ts +++ b/src/fields/InkField.ts @@ -4,6 +4,7 @@ import { Deserializable } from "../client/util/SerializationHelper"; import { Copy, ToScriptString, ToString } from "./FieldSymbols"; import { ObjectField } from "./ObjectField"; import { DocumentView } from "../client/views/nodes/DocumentView"; +import { Bezier } from "bezier-js"; // Helps keep track of the current ink tool in use. export enum InkTool { @@ -22,10 +23,14 @@ export interface PointData { } export interface Intersection { - t: number; - ink: DocumentView; + t?: number; + ink?: DocumentView; + curve?: Bezier; + index?: number; } +export type Segment = Array; + // Defines an ink as an array of points. export type InkData = Array; -- cgit v1.2.3-70-g09d2