From 43770615603c9d0f0aa19a3a676822737157c161 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Wed, 6 Mar 2024 09:44:38 -0500
Subject: enabled copy and paste to work with template docs (and not copy
 template).  Fixed tempaltes of collections to allow new nodes to be
 added/removed.

---
 src/client/views/nodes/ScriptingBox.tsx | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 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 89650889d..d9d0dbe3e 100644
--- a/src/client/views/nodes/ScriptingBox.tsx
+++ b/src/client/views/nodes/ScriptingBox.tsx
@@ -130,7 +130,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
                 }
             })
         );
-        observer.observe(document.getElementsByClassName('scriptingBox')[0]);
+        observer.observe(document.getElementsByClassName('scriptingBox-outerDiv')[0]);
     }
 
     @action
@@ -811,22 +811,20 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
     render() {
         TraceMobx();
         return (
-            <div className={`scriptingBox`} onContextMenu={this.specificContextMenu} onPointerUp={!this._function ? this.suggestionPos : undefined}>
-                <div className="scriptingBox-outerDiv" onWheel={e => this._props.isSelected() && e.stopPropagation()}>
-                    {this._paramSuggestion ? (
-                        <div className="boxed" ref={this._suggestionRef} style={{ left: this._suggestionBoxX + 20, top: this._suggestionBoxY - 15, display: 'inline' }}>
-                            {' '}
-                            {this._scriptSuggestedParams}{' '}
-                        </div>
-                    ) : null}
-                    {!this._applied && !this._function ? this.renderScriptingInputs : null}
-                    {this._applied && !this._function ? this.renderParamsInputs() : null}
-                    {!this._applied && this._function ? this.renderFunctionInputs() : null}
-
-                    {!this._applied && !this._function ? this.renderScriptingTools() : null}
-                    {this._applied && !this._function ? this.renderTools('Run', () => this.onRun()) : null}
-                    {!this._applied && this._function ? this.renderTools('Create Function', () => this.onCreate()) : null}
-                </div>
+            <div className="scriptingBox-outerDiv" onContextMenu={this.specificContextMenu} onPointerUp={!this._function ? this.suggestionPos : undefined} onWheel={e => this._props.isSelected() && e.stopPropagation()}>
+                {this._paramSuggestion ? (
+                    <div className="boxed" ref={this._suggestionRef} style={{ left: this._suggestionBoxX + 20, top: this._suggestionBoxY - 15, display: 'inline' }}>
+                        {' '}
+                        {this._scriptSuggestedParams}{' '}
+                    </div>
+                ) : null}
+                {!this._applied && !this._function ? this.renderScriptingInputs : null}
+                {this._applied && !this._function ? this.renderParamsInputs() : null}
+                {!this._applied && this._function ? this.renderFunctionInputs() : null}
+
+                {!this._applied && !this._function ? this.renderScriptingTools() : null}
+                {this._applied && !this._function ? this.renderTools('Run', () => this.onRun()) : null}
+                {!this._applied && this._function ? this.renderTools('Create Function', () => this.onCreate()) : null}
             </div>
         );
     }
-- 
cgit v1.2.3-70-g09d2

