diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-07-25 19:33:44 -0400 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-07-25 19:33:44 -0400 |
commit | 6c6c2a6c8e40b9f04942e65c416e16f1d3831385 (patch) | |
tree | 94c24a134e4a71bee473a93c59cfcf690f6a87e8 /src/new_fields/InkField.ts | |
parent | 0baefb4e0b133df60f42d894733113c961740af3 (diff) | |
parent | e1c7add158ce245ce6cb557177986b31fe107dd8 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into stackingSections_2
Diffstat (limited to 'src/new_fields/InkField.ts')
-rw-r--r-- | src/new_fields/InkField.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/new_fields/InkField.ts b/src/new_fields/InkField.ts index 39c6c8ce3..8f64c1c2e 100644 --- a/src/new_fields/InkField.ts +++ b/src/new_fields/InkField.ts @@ -19,6 +19,8 @@ export interface StrokeData { page: number; } +export type InkData = Map<string, StrokeData>; + const pointSchema = createSimpleSchema({ x: true, y: true }); @@ -31,9 +33,9 @@ const strokeDataSchema = createSimpleSchema({ @Deserializable("ink") export class InkField extends ObjectField { @serializable(map(object(strokeDataSchema))) - readonly inkData: Map<string, StrokeData>; + readonly inkData: InkData; - constructor(data?: Map<string, StrokeData>) { + constructor(data?: InkData) { super(); this.inkData = data || new Map; } |