aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ScriptingBox.tsx
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-10 15:21:07 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-06-10 15:21:07 -0500
commit9903795cff2060526d68d7cc357493e3e3749476 (patch)
tree48bca1731725738de63cfd0fa4d96620d54e2a59 /src/client/views/nodes/ScriptingBox.tsx
parent44a58920db4905f6db4d8e97fa8e1c7e394c7370 (diff)
UI cleanup
Diffstat (limited to 'src/client/views/nodes/ScriptingBox.tsx')
-rw-r--r--src/client/views/nodes/ScriptingBox.tsx15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index 61f58cb0f..cf941fb7a 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -22,7 +22,6 @@ const _global = (window /* browser */ || global /* node */) as any;
import ReactTextareaAutocomplete from "@webscopeio/react-textarea-autocomplete";
import "@webscopeio/react-textarea-autocomplete/style.css";
-//import { ScriptManager } from "../../util/ScriptManager";
const ScriptingSchema = createSchema({});
@@ -240,6 +239,8 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps, Sc
@action
onCreate = () => {
+ this._errorMessage = "";
+
if (this.functionName.length === 0) {
this._errorMessage = "Must enter a function name";
return false;
@@ -321,12 +322,12 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps, Sc
/>;
return <div className="scriptingBox-inputDiv" onPointerDown={e => this.props.isSelected() && e.stopPropagation()} >
- <div className="scriptingBox-wrapper">
- <div className="container">
- <div style={{ textAlign: "center", display: "inline-block" }}> Enter a name for this function: </div>
- <div> {nameInput}</div>
- <div style={{ textAlign: "center", display: "inline-block" }}> Enter a description of this function: </div>
- <div>{descriptionInput}</div>
+ <div className="scriptingBox-wrapper" style={{ maxWidth: "100%" }}>
+ <div className="container" style={{ maxWidth: "100%" }}>
+ <div className="descriptor" style={{ textAlign: "center", display: "inline-block", maxWidth: "100%" }}> Enter a function name: </div>
+ <div style={{ maxWidth: "100%" }}> {nameInput}</div>
+ <div className="descriptor" style={{ textAlign: "center", display: "inline-block", maxWidth: "100%" }}> Enter a function description: </div>
+ <div style={{ maxWidth: "100%" }}>{descriptionInput}</div>
</div>
</div>
{this.renderErrorMessage()}