diff options
author | bobzel <zzzman@gmail.com> | 2021-04-08 15:42:09 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-04-08 15:42:09 -0400 |
commit | 742cd3d9e76f188e0a78b2c4288e0d7e6af14fe8 (patch) | |
tree | 89b69f7def785581ca42d5ef7c9f18e8c39710ee /src/client/documents/Documents.ts | |
parent | c96fedc5f6454895a443fa8ee3267d69feda3431 (diff) |
fixed pushpins to be created only when removed from a collection. fixed webbox links which weren't showing up in link menu.
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 90db8644d..38a9bd0e1 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -1317,7 +1317,7 @@ export namespace DocUtils { } } - export function LeavePushpin(doc: Doc) { + export function LeavePushpin(doc: Doc, annotationField: string) { if (doc.isPushpin) return undefined; const context = Cast(doc.context, Doc, null) ?? Cast(doc.annotationOn, Doc, null); const hasContextAnchor = DocListCast(doc.links). @@ -1330,7 +1330,7 @@ export namespace DocUtils { icon: "map-pin", x: Cast(doc.x, "number", null), y: Cast(doc.y, "number", null), backgroundColor: "#ACCEF7", _width: 15, _height: 15, _xPadding: 0, _isLinkButton: true, _timecodeToShow: Cast(doc._timecodeToShow, "number", null) }); - Doc.AddDocToList(context, Doc.LayoutFieldKey(context) + "-annotations", pushpin); + Doc.AddDocToList(context, annotationField, pushpin); const pushpinLink = DocUtils.MakeLink({ doc: pushpin }, { doc: doc }, "pushpin", ""); doc._timecodeToShow = undefined; return pushpin; |