aboutsummaryrefslogtreecommitdiff
path: root/src/new_fields/InkField.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/new_fields/InkField.ts')
-rw-r--r--src/new_fields/InkField.ts50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/new_fields/InkField.ts b/src/new_fields/InkField.ts
deleted file mode 100644
index bb93de5ac..000000000
--- a/src/new_fields/InkField.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { Deserializable } from "../client/util/SerializationHelper";
-import { serializable, custom, createSimpleSchema, list, object, map } from "serializr";
-import { ObjectField } from "./ObjectField";
-import { Copy, ToScriptString, ToString } from "./FieldSymbols";
-
-export enum InkTool {
- None,
- Pen,
- Highlighter,
- Eraser,
- Stamp
-}
-
-export interface PointData {
- X: number;
- Y: number;
-}
-
-export type InkData = Array<PointData>;
-
-const pointSchema = createSimpleSchema({
- X: true, Y: true
-});
-
-const strokeDataSchema = createSimpleSchema({
- pathData: list(object(pointSchema)),
- "*": true
-});
-
-@Deserializable("ink")
-export class InkField extends ObjectField {
- @serializable(list(object(strokeDataSchema)))
- readonly inkData: InkData;
-
- constructor(data: InkData) {
- super();
- this.inkData = data;
- }
-
- [Copy]() {
- return new InkField(this.inkData);
- }
-
- [ToScriptString]() {
- return "invalid";
- }
- [ToString]() {
- return "InkField";
- }
-}