aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DropConverter.ts
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2020-01-17 18:26:45 -0500
committerSam Wilkins <samwilkins333@gmail.com>2020-01-17 18:26:45 -0500
commit82851b81ced87c6c71b1bbdfbba797992f585a03 (patch)
tree488dff666750a4522d725a98a7b103afefb94e65 /src/client/util/DropConverter.ts
parente4c8cd2fef1242cfb3e4a14e3e3d7bfc852126bd (diff)
parent9843b5c5b3d07003aeafc358abdaa6c8c8b1ba48 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r--src/client/util/DropConverter.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts
index da0ad7efe..dc66bceee 100644
--- a/src/client/util/DropConverter.ts
+++ b/src/client/util/DropConverter.ts
@@ -27,7 +27,8 @@ function makeTemplate(doc: Doc): boolean {
export function convertDropDataToButtons(data: DragManager.DocumentDragData) {
data && data.draggedDocuments.map((doc, i) => {
let dbox = doc;
- if (!doc.onDragStart && !doc.onClick && doc.viewType !== CollectionViewType.Linear) {
+ // bcz: isButtonBar is intended to allow a collection of linear buttons to be dropped and nested into another collection of buttons... it's not being used yet, and isn't very elegant
+ if (!doc.onDragStart && !doc.onClick && !doc.isButtonBar) {
const layoutDoc = doc.layout instanceof Doc && doc.layout.isTemplateField ? doc.layout : doc;
if (layoutDoc.type === DocumentType.COL) {
layoutDoc.isTemplateDoc = makeTemplate(layoutDoc);
@@ -38,7 +39,7 @@ export function convertDropDataToButtons(data: DragManager.DocumentDragData) {
dbox.dragFactory = layoutDoc;
dbox.removeDropProperties = doc.removeDropProperties instanceof ObjectField ? ObjectField.MakeCopy(doc.removeDropProperties) : undefined;
dbox.onDragStart = ScriptField.MakeFunction('getCopy(this.dragFactory, true)');
- } else if (doc.viewType === CollectionViewType.Linear) {
+ } else if (doc.isButtonBar) {
dbox.ignoreClick = true;
}
data.droppedDocuments[i] = dbox;