diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2019-04-30 19:48:36 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2019-04-30 19:48:36 -0400 |
commit | 3ed9fbefe1428c1493027122791ccbbe1b2fe1d1 (patch) | |
tree | adac80637e3824bcb8f54bca5929c1175fdabb95 /src/new_fields/Doc.ts | |
parent | 7d4a4b25459b66568880528cd3776b6ff9cbcf9f (diff) |
fixed link document
Diffstat (limited to 'src/new_fields/Doc.ts')
-rw-r--r-- | src/new_fields/Doc.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/new_fields/Doc.ts b/src/new_fields/Doc.ts index 64cc6d270..c4ad5ae95 100644 --- a/src/new_fields/Doc.ts +++ b/src/new_fields/Doc.ts @@ -1,7 +1,6 @@ import { observable, action } from "mobx"; import { serializable, primitive, map, alias, list } from "serializr"; import { autoObject, SerializationHelper, Deserializable } from "../client/util/SerializationHelper"; -import { Utils } from "../Utils"; import { DocServer } from "../client/DocServer"; import { setter, getter, getField, updateFunction, deleteProperty } from "./util"; import { Cast, ToConstructor, PromiseValue, FieldValue, NumCast } from "./Types"; @@ -10,6 +9,7 @@ import { listSpec } from "./Schema"; import { List } from "./List"; import { ObjectField, Parent, OnUpdate } from "./ObjectField"; import { RefField, FieldId, Id } from "./RefField"; +import { Docs } from "../client/documents/Documents"; export function IsField(field: any): field is Field { return (typeof field === "string") @@ -163,9 +163,9 @@ export namespace Doc { return copy; } - export function MakeLink(source: Doc, target: Doc): Doc { - return UndoManager.RunInBatch(() => { - let linkDoc = new Doc; + export function MakeLink(source: Doc, target: Doc) { + UndoManager.RunInBatch(() => { + let linkDoc = Docs.TextDocument({ width: 100, height: 30, borderRounding: -1 }); linkDoc.title = "New Link"; linkDoc.linkDescription = ""; linkDoc.linkTags = "Default"; |