From cb87bab7ea67aa384a3183890ea413965e020047 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Fri, 5 Jun 2020 16:54:02 -0500 Subject: bolded param that is being entered --- src/client/views/nodes/ScriptingBox.tsx | 37 +++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx index 00c4759f7..071a990a3 100644 --- a/src/client/views/nodes/ScriptingBox.tsx +++ b/src/client/views/nodes/ScriptingBox.tsx @@ -44,8 +44,6 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent p.split(":")[0].trim()); } @computed({ keepAlive: true }) get paramsTypes() { return this.compileParams.map(p => p.split(":")[1].trim()); } @@ -480,8 +482,11 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent 0) { + + if (this._scriptParamsText !== undefined && this._scriptParamsText.length > 0) { if (this.rawScript[pos - 2] !== "(") { this._paramSuggestion = true; } @@ -494,7 +499,7 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent this.rawScript.slice(0, this.rawScript.length - 1).split(")").length - 1) { - if (this._scriptSuggestedParams.length > 0) { + if (this._scriptParamsText.length > 0) { this._paramSuggestion = true; } } @@ -511,6 +516,30 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent { + if (i < numEntered - 1) { + first = first + element; + } else if (i > numEntered - 1) { + last = last + element; + } + }); + + this._scriptSuggestedParams =
{first} {parameters[numEntered - 1]} {last}
; + } } @action -- cgit v1.2.3-70-g09d2