aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DropConverter.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-17 09:25:52 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-17 09:25:52 -0400
commit61e302ff1607584b460960844d9a0e065e4d7405 (patch)
tree85d2f20963ca482a0e8e3b88b97e65c849758af3 /src/client/util/DropConverter.ts
parentc2349c0b00ae15e2aa715e0b535a88d5a3d89f5e (diff)
fixed dropping toolicons to make aliases
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r--src/client/util/DropConverter.ts6
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);