diff options
author | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-24 11:00:09 -0400 |
---|---|---|
committer | Mohammad Amoush <mohammad_amoush@brown.edu> | 2019-07-24 11:00:09 -0400 |
commit | 5591060e868053c8839fcc1de1ae77d4dac361ac (patch) | |
tree | cd2ec5a046686e5cf481a157fbebbcc479368282 /src/new_fields/InkField.ts | |
parent | 2edcfb8a755b7fec7f937f135c794cbadbe0c94e (diff) | |
parent | 7fce10e6d687364feac6fd93a362634018a9f3ee (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into youtube-api-muhammed
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; } |