aboutsummaryrefslogtreecommitdiff
path: root/src/fields
diff options
context:
space:
mode:
Diffstat (limited to 'src/fields')
-rw-r--r--src/fields/Doc.ts1
-rw-r--r--src/fields/InkField.ts3
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";