diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-16 23:01:31 -0400 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-16 23:01:31 -0400 |
| commit | 4f9cfaccc8e0f3d16cf4373e01e6b85c99adabfd (patch) | |
| tree | 93a5678900c4f010ec465fa0878c6374f07c0abc /src/client/views/collections/CollectionView.tsx | |
| parent | 433909d26b555fa8fb837dbf06e1620b3b483377 (diff) | |
| parent | ec0510a3d80f065ab8aa1e5280e50d689628f008 (diff) | |
merging
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionView.tsx | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index be5a4b852..34fd20f1a 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -154,19 +154,7 @@ export class CollectionView extends Touchable<CollectionViewProps> { } else { added.filter(doc => [AclAdmin, AclEdit].includes(GetEffectiveAcl(doc))).map(doc => { // only make a pushpin if we have acl's to edit the document - const context = Cast(doc.context, Doc, null); - const hasContextAnchor = DocListCast(doc.links).some(l => (l.anchor2 === doc && Cast(l.anchor1, Doc, null)?.annotationOn === context) || (l.anchor1 === doc && Cast(l.anchor2, Doc, null)?.annotationOn === context)); - if (context && !hasContextAnchor && (context.type === DocumentType.VID || context.type === DocumentType.WEB || context.type === DocumentType.PDF || context.type === DocumentType.IMG)) { - const pushpin = Docs.Create.FontIconDocument({ - title: "pushpin", label: "", annotationOn: Cast(doc.annotationOn, Doc, null), isPushpin: true, - icon: "map-pin", x: Cast(doc.x, "number", null), y: Cast(doc.y, "number", null), backgroundColor: "#0000003d", color: "#ACCEF7", - _width: 15, _height: 15, _xPadding: 0, isLinkButton: true, _timecodeToShow: Cast(doc._timecodeToShow, "number", null) - }); - Doc.SetInPlace(doc, "annotationOn", undefined, true); - Doc.AddDocToList(context, Doc.LayoutFieldKey(context) + "-annotations", pushpin); - const pushpinLink = DocUtils.MakeLink({ doc: pushpin }, { doc: doc }, "pushpin", ""); - doc._timecodeToShow = undefined; - } + DocUtils.LeavePushpin(doc); doc._stayInCollection = undefined; doc.context = this.props.Document; }); |
