diff options
| author | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-23 21:59:26 -0700 |
|---|---|---|
| committer | Lionel Han <47760119+IGoByJoe@users.noreply.github.com> | 2020-06-23 21:59:26 -0700 |
| commit | 627f4e582fe3a18d1c971b7e3850605e662afb7a (patch) | |
| tree | 086666db799d6d3d61befa248735423bebb71adf /src/client/util/DropConverter.ts | |
| parent | b989082c3502e8ad5ca3a89a8459e6ac72e38ccc (diff) | |
| parent | 527dce9247d06705d089ea75a81638d5c486cd7e (diff) | |
Merge branch 'mobile_revision_direct' of https://github.com/browngraphicslab/Dash-Web into mobile_revision_direct
Diffstat (limited to 'src/client/util/DropConverter.ts')
| -rw-r--r-- | src/client/util/DropConverter.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts index ea1769d85..f9837298d 100644 --- a/src/client/util/DropConverter.ts +++ b/src/client/util/DropConverter.ts @@ -54,10 +54,12 @@ export function makeTemplate(doc: Doc, first: boolean = true, rename: Opt<string return any; } export function convertDropDataToButtons(data: DragManager.DocumentDragData) { - data && data.draggedDocuments.map((doc, i) => { + data?.draggedDocuments.map((doc, i) => { let dbox = doc; // 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.isButtonBar) { + if (doc.type === DocumentType.FONTICON) { + dbox = Doc.MakeAlias(doc); + } else if (!doc.onDragStart && !doc.isButtonBar) { const layoutDoc = doc.layout instanceof Doc && doc.layout.isTemplateForField ? doc.layout : doc; if (layoutDoc.type !== DocumentType.FONTICON) { !layoutDoc.isTemplateDoc && makeTemplate(layoutDoc); |
