From fa2d4e4e66f7f1de51a579b3a121ca1a2a7d56a8 Mon Sep 17 00:00:00 2001
From: srichman333 <sarah_n_richman@brown.edu>
Date: Thu, 30 Nov 2023 01:38:05 -0500
Subject: drag onto canvas

---
 .../views/collections/collectionFreeForm/CollectionFreeFormView.tsx   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')

diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index e1ff4fda3..19689f972 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1997,10 +1997,10 @@ ScriptingGlobals.add(function datavizFromSchema(doc: Doc) {
         const loading = Docs.Create.LoadingDocument(file, options);
         loading.presentation_openInLightbox = true;
         DocUtils.uploadFileToDoc(file, {}, loading);
-       // if (view.ComponentView?.addDocument) view.ComponentView?.addDocument(loading);
 
         if (view.ComponentView?.addDocument) {
-            SchemaCSVPopUp.Instance.addToCollection = view.ComponentView?.addDocument;
+            SchemaCSVPopUp.Instance.setView(view);
+            SchemaCSVPopUp.Instance.setTarget(view.rootDoc);
             SchemaCSVPopUp.Instance.setDataVizDoc(loading);
             SchemaCSVPopUp.Instance.setVisible(true);
         }
-- 
cgit v1.2.3-70-g09d2

