diff options
| author | yipstanley <stanley_yip@brown.edu> | 2019-07-28 20:34:43 -0400 |
|---|---|---|
| committer | yipstanley <stanley_yip@brown.edu> | 2019-07-28 20:34:43 -0400 |
| commit | c07af17b6881d672825d8e577c1f6f600996e62e (patch) | |
| tree | 8f023907dbe0269e5ef82ea1fa400b28cca1be9e /src/client/views/nodes/ButtonBox.tsx | |
| parent | 99ab639f4de270eb1f7b497b6386cb8d5a1f7e5f (diff) | |
| parent | aaf1776644f6701462022cccc7088c24b5c72000 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/ButtonBox.tsx')
| -rw-r--r-- | src/client/views/nodes/ButtonBox.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/ButtonBox.tsx b/src/client/views/nodes/ButtonBox.tsx index 744611661..d2c23fdab 100644 --- a/src/client/views/nodes/ButtonBox.tsx +++ b/src/client/views/nodes/ButtonBox.tsx @@ -14,6 +14,7 @@ import { Doc } from '../../../new_fields/Doc'; import './ButtonBox.scss'; import { observer } from 'mobx-react'; +import { DocumentIconContainer } from './DocumentIcon'; library.add(faEdit); @@ -51,7 +52,8 @@ export class ButtonBox extends DocComponent<FieldViewProps, ButtonDocument>(Butt const script = CompileScript(text, { params: { this: Doc.name }, typecheck: false, - editable: true + editable: true, + transformer: DocumentIconContainer.getTransformer() }); if (!script.compiled) { onError(script.errors.map(error => error.messageText).join("\n")); @@ -59,7 +61,7 @@ export class ButtonBox extends DocComponent<FieldViewProps, ButtonDocument>(Butt } this.Document.onClick = new ScriptField(script); overlayDisposer(); - }} />; + }} showDocumentIcons />; overlayDisposer = OverlayView.Instance.addWindow(scriptingBox, { x: 400, y: 200, width: 500, height: 400, title: `${this.Document.title || ""} OnClick` }); } }); |
