From a261ab5e9697277bec029803f1fa0c890f0c8fd5 Mon Sep 17 00:00:00 2001
From: anika-ahluwalia <anika.ahluwalia@gmail.com>
Date: Sat, 18 Apr 2020 17:47:03 -0500
Subject: fix button UI on scripting, changed button onClick

---
 src/client/views/nodes/ScriptingBox.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'src/client/views/nodes/ScriptingBox.tsx')

diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx
index bd20f9f67..317c48c1a 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -84,7 +84,9 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps, Sc
         />;
         return (
             <div className="scriptingBox-outerDiv"
+
                 onWheel={e => this.props.isSelected(true) && e.stopPropagation()}>
+
                 <div className="scriptingBox-inputDiv"
                     onPointerDown={e => this.props.isSelected(true) && e.stopPropagation()} >
                     <textarea className="scriptingBox-textarea"
@@ -98,12 +100,16 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps, Sc
                 </div>
                 {this.rootDoc.layout === "layout" ? <div></div> : (null)}
                 <div className="scriptingBox-toolbar">
-                    <button className="scriptingBox-button" onPointerDown={e => { this.onCompile(); e.stopPropagation(); }}>Compile</button>
-                    <button className="scriptingBox-button" onPointerDown={e => { this.onRun(); e.stopPropagation(); }}>Run</button>
+                    <button className="scriptingBox-button" style={{ width: this.rootDoc.layoutKey === "layout_onClick" ? "33%" : "50%" }}
+                        onPointerDown={e => { this.onCompile(); e.stopPropagation(); }}>Compile</button>
+                    <button className="scriptingBox-button" style={{ width: this.rootDoc.layoutKey === "layout_onClick" ? "33%" : "50%" }}
+                        onPointerDown={e => { this.onRun(); e.stopPropagation(); }}>Run</button>
                     {this.rootDoc.layoutKey === "layout_onClick" ? <button className="scriptingBox-button"
+                        style={{ width: this.rootDoc.layoutKey === "layout_onClick" ? "33%" : "50%" }}
                         onPointerDown={e => { this.onFinish(); e.stopPropagation(); }}>Finish</button> : null}
                 </div>
             </div>
         );
     }
+
 }
-- 
cgit v1.2.3-70-g09d2

