diff options
| author | mehekj <mehek.jethani@gmail.com> | 2022-04-12 18:11:13 -0400 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2022-04-12 18:11:13 -0400 |
| commit | 82272cc4735a9da78a1c4592bdf460f1ab6e644d (patch) | |
| tree | b2980350c566102048cee05d5d153d78a49a4d89 /src/fields | |
| parent | b3424535cb746ff9fba35375d9abf07ba174dcf0 (diff) | |
| parent | ab0e1ac6f5b21f2e10bdce428c882482a0f159b4 (diff) | |
Merge branch 'inkocr-mehek' into inking-naafi-mehek
Diffstat (limited to 'src/fields')
| -rw-r--r-- | src/fields/Doc.ts | 1 | ||||
| -rw-r--r-- | src/fields/InkField.ts | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 1253cf9c7..642becb46 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -346,6 +346,7 @@ export namespace Doc { return GetT(doc, "system", "boolean", true); } export async function SetInPlace(doc: Doc, key: string, value: Field | undefined, defaultProto: boolean) { + if (key.startsWith("_")) key = key.substring(1); const hasProto = doc.proto instanceof Doc; const onDeleg = Object.getOwnPropertyNames(doc).indexOf(key) !== -1; const onProto = hasProto && Object.getOwnPropertyNames(doc.proto).indexOf(key) !== -1; diff --git a/src/fields/InkField.ts b/src/fields/InkField.ts index c34e8f93d..6d24c6cbc 100644 --- a/src/fields/InkField.ts +++ b/src/fields/InkField.ts @@ -20,6 +20,7 @@ export enum InkTool { export interface PointData { X: number; Y: number; + time?: number; } export type Segment = Array<Bezier>; @@ -84,7 +85,7 @@ export class InkField extends ObjectField { } [ToScriptString]() { - return "new InkField([" + this.inkData.map(i => `{X: ${i.X}, Y: ${i.Y}} `) + "])"; + return "new InkField([" + this.inkData.map(i => `{X: ${i.X}, Y: ${i.Y}, time: ${i.time || 0}} `) + "])"; } [ToString]() { return "InkField"; |
