aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/InkField.ts
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-24 12:56:36 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-24 12:56:36 -0400
commitb82616ee5e6158a5bd787bc2675c51db3962fc8b (patch)
treeddacf649f8a2d000a81b0030ca085f480b83ab4b /src/new_fields/InkField.ts
parentc96ba0c2e8ce67e16b613f6a48e6b8e6fd5daa68 (diff)
parent7fce10e6d687364feac6fd93a362634018a9f3ee (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.ts6
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;
}