diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-04-29 20:32:39 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-04-29 20:32:39 -0400 |
| commit | 08849062e84087ac24031944af8697c87d7d183c (patch) | |
| tree | 4e21bbc4fa144ab5e5a17bdfbeea87b729ff091a /src/fields/IconFIeld.ts | |
| parent | 986595be59e714de4fe6c677dcace3c3f402ac82 (diff) | |
| parent | 3da71792a339536118b7af7cfe0529201a45c64e (diff) | |
Merge branch 'master' into presentation_view
Diffstat (limited to 'src/fields/IconFIeld.ts')
| -rw-r--r-- | src/fields/IconFIeld.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/fields/IconFIeld.ts b/src/fields/IconFIeld.ts new file mode 100644 index 000000000..a6694cc49 --- /dev/null +++ b/src/fields/IconFIeld.ts @@ -0,0 +1,25 @@ +import { BasicField } from "./BasicField"; +import { FieldId } from "./Field"; +import { Types } from "../server/Message"; + +export class IconField extends BasicField<string> { + constructor(data: string = "", id?: FieldId, save: boolean = true) { + super(data, save, id); + } + + ToScriptString(): string { + return `new IconField("${this.Data}")`; + } + + Copy() { + return new IconField(this.Data); + } + + ToJson() { + return { + type: Types.Icon, + data: this.Data, + id: this.Id + }; + } +}
\ No newline at end of file |
