aboutsummaryrefslogtreecommitdiff
path: root/src/client/util
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-09 11:52:11 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-09 11:52:11 -0400
commitc38cd3c24c254aec3cfad1e7d8c31d8f584e96f0 (patch)
tree5c7ff1d4c194bdd7d9a366bfdb3cc65dfb9c9fca /src/client/util
parentd165aad7c31395db6cff8d5029e4638534f609e3 (diff)
added initial script template (onClick) for script behaviors
Diffstat (limited to 'src/client/util')
-rw-r--r--src/client/util/DropConverter.ts4
-rw-r--r--src/client/util/Scripting.ts4
2 files changed, 3 insertions, 5 deletions
diff --git a/src/client/util/DropConverter.ts b/src/client/util/DropConverter.ts
index d572e64a6..eb4d3a9b0 100644
--- a/src/client/util/DropConverter.ts
+++ b/src/client/util/DropConverter.ts
@@ -52,10 +52,8 @@ export function convertDropDataToButtons(data: DragManager.DocumentDragData) {
// 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) {
const layoutDoc = doc.layout instanceof Doc && doc.layout.isTemplateForField ? doc.layout : doc;
- if (layoutDoc.type === DocumentType.COL || layoutDoc.type === DocumentType.RTF || layoutDoc.type === DocumentType.IMG) {
+ if (layoutDoc.type !== DocumentType.FONTICON) {
!layoutDoc.isTemplateDoc && makeTemplate(layoutDoc);
- } else {
- (layoutDoc.layout instanceof Doc) && !data.userDropAction;
}
layoutDoc.isTemplateDoc = true;
dbox = Docs.Create.FontIconDocument({
diff --git a/src/client/util/Scripting.ts b/src/client/util/Scripting.ts
index 57d22eaf8..12628273b 100644
--- a/src/client/util/Scripting.ts
+++ b/src/client/util/Scripting.ts
@@ -41,9 +41,9 @@ export interface CompileError {
export type CompileResult = CompiledScript | CompileError;
export function isCompileError(toBeDetermined: CompileResult): toBeDetermined is CompileError {
if ((toBeDetermined as CompileError).errors) {
- return true
+ return true;
}
- return false
+ return false;
}
export namespace Scripting {