aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DropConverter.ts
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2020-01-30 15:48:02 -0500
committerbob <bcz@cs.brown.edu>2020-01-30 15:48:02 -0500
commitd7a076ca7315a892b6a43b0e7454abf470f48455 (patch)
tree54412c403cbe240dff6d0b6f3107705533338aa5 /src/client/util/DropConverter.ts
parentfa746ce5faa3f0cd0c1cd53644c6631540284802 (diff)
small template fixes for text mostly.
Diffstat (limited to 'src/client/util/DropConverter.ts')
-rw-r--r--src/client/util/DropConverter.ts5
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;