aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DropConverter.ts
diff options
context:
space:
mode:
authorsrichman333 <sarah_n_richman@brown.edu>2023-11-06 18:36:58 -0500
committersrichman333 <sarah_n_richman@brown.edu>2023-11-06 18:36:58 -0500
commit1b412d402c77a2aae82cf86b1f6a23f8a4f82caf (patch)
tree7ebd22eeade12099d1d891d9f9b264f02956ad4a /src/client/util/DropConverter.ts
parent7163062edec37cef9dd9ae6c123d987e83837463 (diff)
parenta4e3b645317c4589cf49f8007f6e6b57cf2c12d3 (diff)
Merge branch 'master' into dataViz-annotations
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r--src/client/util/DropConverter.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts
index dbdf580cd..2c371f28e 100644
--- a/src/client/util/DropConverter.ts
+++ b/src/client/util/DropConverter.ts
@@ -7,7 +7,7 @@ import { Cast, StrCast } from '../../fields/Types';
import { ImageField } from '../../fields/URLField';
import { Docs } from '../documents/Documents';
import { DocumentType } from '../documents/DocumentTypes';
-import { ButtonType } from '../views/nodes/FontIconBox/FontIconBox';
+import { ButtonType, FontIconBox } from '../views/nodes/FontIconBox/FontIconBox';
import { DragManager } from './DragManager';
import { ScriptingGlobals } from './ScriptingGlobals';
@@ -56,7 +56,7 @@ export function convertDropDataToButtons(data: DragManager.DocumentDragData) {
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.type === DocumentType.FONTICON || StrCast(Doc.Layout(doc).layout).includes('FontIconBox')) {
+ if (doc.type === DocumentType.FONTICON || StrCast(Doc.Layout(doc).layout).includes(FontIconBox.name)) {
if (data.dropPropertiesToRemove || dbox.dropPropertiesToRemove) {
//dbox = Doc.MakeEmbedding(doc); // don't need to do anything if dropping an icon doc onto an icon bar since there should be no layout data for an icon
dbox = Doc.MakeEmbedding(dbox);
@@ -78,7 +78,7 @@ export function convertDropDataToButtons(data: DragManager.DocumentDragData) {
backgroundColor: StrCast(doc.backgroundColor),
title: StrCast(layoutDoc.title),
btnType: ButtonType.ClickButton,
- icon: layoutDoc.isTemplateDoc ? 'font' : 'bolt',
+ icon: 'bolt',
});
dbox.dragFactory = layoutDoc;
dbox.dropPropertiesToRemove = doc.dropPropertiesToRemove instanceof ObjectField ? ObjectField.MakeCopy(doc.dropPropertiesToRemove) : undefined;