diff options
author | bobzel <zzzman@gmail.com> | 2023-11-29 10:02:34 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-11-29 10:02:34 -0500 |
commit | ba3b3f6f261074bd3f35012bde8730f5d4a36905 (patch) | |
tree | 6f6c7b141f8bc5881113378801d4b2940cfde36a /src/client/views/nodes/ScriptingBox.tsx | |
parent | ac360607bee82f0fef769eada99dc0b3f85ae70a (diff) |
numerous changes to fix bugs and to fix/remove old or hacky code. fixed doc dec resizing. moving this.rootDoc => this.Document . fixing template artifacts.
Diffstat (limited to 'src/client/views/nodes/ScriptingBox.tsx')
-rw-r--r-- | src/client/views/nodes/ScriptingBox.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx index 197c520c7..a51a83b26 100644 --- a/src/client/views/nodes/ScriptingBox.tsx +++ b/src/client/views/nodes/ScriptingBox.tsx @@ -200,7 +200,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatable if (this.onCompile()) { const bindings: { [name: string]: any } = {}; this.paramsNames.forEach(key => (bindings[key] = this.rootDoc[key])); - // binds vars so user doesnt have to refer to everything as self.<var> + // binds vars so user doesnt have to refer to everything as this.<var> ScriptCast(this.rootDoc[this.fieldKey], null)?.script.run({ ...bindings, self: this.rootDoc, this: this.layoutDoc }, this.onError); } }; @@ -748,7 +748,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatable // inputs UI for params which allows you to set values for each displayed in a list renderParamsInputs() { return ( - <div className="scriptingBox-inputDiv" onPointerDown={e => this.props.isSelected(true) && e.stopPropagation()}> + <div className="scriptingBox-inputDiv" onPointerDown={e => this.props.isSelected() && e.stopPropagation()}> {!this.compileParams.length || !this.paramsNames ? null : ( <div className="scriptingBox-plist"> {this.paramsNames.map((parameter: string, i: number) => ( @@ -815,7 +815,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatable TraceMobx(); return ( <div className={`scriptingBox`} onContextMenu={this.specificContextMenu} onPointerUp={!this._function ? this.suggestionPos : undefined}> - <div className="scriptingBox-outerDiv" onWheel={e => this.props.isSelected(true) && e.stopPropagation()}> + <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' }}> {' '} |