aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSubView.tsx
diff options
context:
space:
mode:
authorLionel Han <47760119+IGoByJoe@users.noreply.github.com>2021-01-21 17:31:47 -0800
committerLionel Han <47760119+IGoByJoe@users.noreply.github.com>2021-01-21 17:31:47 -0800
commit78dd6b82033961a06dfb3ad3218763fa4c08d761 (patch)
tree85752b8be1cc9bd50ec8a38cfd11e08e4efbebb1 /src/client/views/collections/CollectionSubView.tsx
parentf0a5763946d6b717fb745f2216dc1e681e3e0c68 (diff)
parent10b759d2bd09af3a8e8a4effbc8fd2312dd873d2 (diff)
pull
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
-rw-r--r--src/client/views/collections/CollectionSubView.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index d7b9d9745..287bc56c2 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -224,7 +224,9 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
}
else if (de.complete.annoDragData && (!this.props.isAnnotationOverlay || de.complete.annoDragData.dragDocument === this.props.Document)) {
e.stopPropagation();
- return this.addDocument(de.complete.annoDragData.dropDocument);
+ de.complete.annoDragData.annotationDocument = de.complete.annoDragData.annotationDocCreator();
+ de.complete.annoDragData.dropDocument = de.complete.annoDragData.dropDocCreator();
+ return de.complete.annoDragData.dropDocument && this.addDocument(de.complete.annoDragData.dropDocument);
}
return false;
}
@@ -266,7 +268,7 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
}
});
} else {
- this.addDocument(Docs.Create.WebDocument(href, { ...options, _fitWidth: true, title: href }));
+ this.addDocument(Docs.Create.WebDocument(href, { ...options, title: href }));
}
} else if (text) {
this.addDocument(Docs.Create.TextDocument(text, { ...options, _showTitle: StrCast(Doc.UserDoc().showTitle), _width: 100, _height: 25 }));
@@ -383,7 +385,6 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
console.log("Adding ...");
const newDoc = Docs.Create.WebDocument(uriList.split("#annotations:")[0], {// clean hypothes.is URLs that reference a specific annotation (eg. https://en.wikipedia.org/wiki/Cartoon#annotations:t7qAeNbCEeqfG5972KR2Ig)
...options,
- _fitWidth: true,
title: uriList.split("#annotations:")[0],
_width: 400,
_height: 512,