aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionViewBase.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-02-25 12:38:47 -0500
committerbob <bcz@cs.brown.edu>2019-02-25 12:38:47 -0500
commitc439f11ba9695703697f7abc53a7cc2fd2d5c1a2 (patch)
treed3977cb05f37ec77eadb782c65d4766777dc0e18 /src/client/views/collections/CollectionViewBase.tsx
parente57c8ed3944bf737afdb2f564d159a53f8a6b1c6 (diff)
fixes for dropping documents without a know height.
Diffstat (limited to 'src/client/views/collections/CollectionViewBase.tsx')
-rw-r--r--src/client/views/collections/CollectionViewBase.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionViewBase.tsx b/src/client/views/collections/CollectionViewBase.tsx
index 7e269caf1..f64a48c18 100644
--- a/src/client/views/collections/CollectionViewBase.tsx
+++ b/src/client/views/collections/CollectionViewBase.tsx
@@ -60,7 +60,7 @@ export class CollectionViewBase extends React.Component<SubCollectionViewProps>
let html = e.dataTransfer.getData("text/html");
let text = e.dataTransfer.getData("text/plain");
- if (html) {
+ if (html && html.indexOf("<img") != 0) {
let htmlDoc = Documents.HtmlDocument(html, { ...options });
htmlDoc.SetText(KeyStore.DocumentText, text);
this.props.addDocument(htmlDoc);
@@ -72,7 +72,7 @@ export class CollectionViewBase extends React.Component<SubCollectionViewProps>
if (item.kind === "string" && item.type.indexOf("uri") != -1) {
e.dataTransfer.items[i].getAsString(function (s) {
action(() => {
- var img = Documents.ImageDocument(s, { ...options, nativeWidth: 300, nativeHeight: 300, width: 300, height: 300 })
+ var img = Documents.ImageDocument(s, { ...options, nativeWidth: 300, width: 300, })
let docs = that.props.Document.GetT(KeyStore.Data, ListField);
if (docs != FieldWaiting) {