From 08d3b5c0208f8ec8e8c42a822c1793a30d107c3b Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 29 Jul 2025 16:31:09 -0400 Subject: tweaking scriptingBox to work somewhat again --- src/client/views/nodes/ScriptingBox.tsx | 76 ++++++++++++++++----------------- 1 file changed, 38 insertions(+), 38 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 38a43e8d4..7887bab5d 100644 --- a/src/client/views/nodes/ScriptingBox.tsx +++ b/src/client/views/nodes/ScriptingBox.tsx @@ -126,7 +126,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent() } @action - resetSuggestionPos(caret: { top: number; left: number; height: number }) { + resetSuggestionPos = (caret: { top: number; left: number; height: number }) => { if (!this._suggestionRef.current || !this._scriptTextRef.current) return; const suggestionWidth = this._suggestionRef.current.offsetWidth; const scriptWidth = this._scriptTextRef.current.offsetWidth; @@ -140,7 +140,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent() this._suggestionBoxX = left; this._suggestionBoxY = top; - } + }; componentWillUnmount() { this._overlayDisposer?.(); @@ -305,7 +305,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent() !existingOptions && ContextMenu.Instance.addItem({ description: 'Options...', subitems: options, icon: 'hand-point-right' }); }; - renderFunctionInputs() { + renderFunctionInputs = () => { const descriptionInput = (