diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-31 11:05:03 -0500 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-01-31 11:05:03 -0500 |
| commit | 5ad15ac012262ac15e152b995cbcb042c5b7cf89 (patch) | |
| tree | fcd3404add281aff240aeb4c9546d0ba16b7d8ec /src/client/util/DropConverter.ts | |
| parent | 96de4bf18d5721d2b7957d7adb8ad3393462c4d1 (diff) | |
| parent | b0544ea44ef78a93deb9290815f95d6d9308447d (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.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts index 669ac5336..d0f1d86cb 100644 --- a/src/client/util/DropConverter.ts +++ b/src/client/util/DropConverter.ts @@ -35,10 +35,11 @@ export function convertDropDataToButtons(data: DragManager.DocumentDragData) { if (!doc.onDragStart && !doc.onClick && !doc.isButtonBar) { const layoutDoc = doc.layout instanceof Doc && doc.layout.isTemplateForField ? doc.layout : doc; if (layoutDoc.type === DocumentType.COL || layoutDoc.type === DocumentType.TEXT || layoutDoc.type === DocumentType.IMG) { - layoutDoc.isTemplateDoc = makeTemplate(layoutDoc); + makeTemplate(layoutDoc); } else { - layoutDoc.isTemplateDoc = (layoutDoc.layout instanceof Doc) && !data.userDropAction; + (layoutDoc.layout instanceof Doc) && !data.userDropAction; } + layoutDoc.isTemplateDoc = true; dbox = Docs.Create.FontIconDocument({ _nativeWidth: 100, _nativeHeight: 100, _width: 100, _height: 100, backgroundColor: StrCast(doc.backgroundColor), title: "Custom", icon: layoutDoc.isTemplateDoc ? "font" : "bolt" }); dbox.dragFactory = layoutDoc; dbox.removeDropProperties = doc.removeDropProperties instanceof ObjectField ? ObjectField.MakeCopy(doc.removeDropProperties) : undefined; |
