diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-24 12:56:36 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-07-24 12:56:36 -0400 |
commit | b82616ee5e6158a5bd787bc2675c51db3962fc8b (patch) | |
tree | ddacf649f8a2d000a81b0030ca085f480b83ab4b /src/new_fields/InkField.ts | |
parent | c96ba0c2e8ce67e16b613f6a48e6b8e6fd5daa68 (diff) | |
parent | 7fce10e6d687364feac6fd93a362634018a9f3ee (diff) |
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
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; } |