diff options
| author | bob <bcz@cs.brown.edu> | 2020-01-17 17:09:29 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2020-01-17 17:09:29 -0500 |
| commit | 03dafe7743dc3e70f9e936aec8bf2e49efbfb041 (patch) | |
| tree | 148b69067c405f1847c89a97f29130098f4f1724 /src/client/util/DropConverter.ts | |
| parent | 9af3c5967e45b98186a2862a1f23e2494630ddb3 (diff) | |
changed view types around to be stored on extension doc. added stuff to stackingview to create views of fields using ';"
Diffstat (limited to 'src/client/util/DropConverter.ts')
| -rw-r--r-- | src/client/util/DropConverter.ts | 5 |
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; |
