From 98a7f820ee07dc3156a97fba7f045efffc7785af Mon Sep 17 00:00:00 2001 From: guerler Date: Tue, 18 Jan 2022 23:15:46 -0500 Subject: [PATCH] Call setMapOver routine in input parameter terminals to detect mapped collections --- .../Workflow/Editor/modules/terminals.js | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/client/src/components/Workflow/Editor/modules/terminals.js b/client/src/components/Workflow/Editor/modules/terminals.js index 51b39ab26c8..359c1c736bb 100644 --- a/client/src/components/Workflow/Editor/modules/terminals.js +++ b/client/src/components/Workflow/Editor/modules/terminals.js @@ -224,6 +224,15 @@ class BaseInputTerminal extends Terminal { this.datatypesMapper = attr.datatypesMapper; this.update(attr.input); // subclasses should implement this... } + setDefaultMapOver(connector) { + var other_output = connector.outputHandle; + if (other_output) { + var otherCollectionType = this._otherCollectionType(other_output); + if (otherCollectionType.isCollection) { + this.setMapOver(otherCollectionType); + } + } + } canAccept(other) { if (this._inputFilled()) { return new ConnectionAcceptable( @@ -385,14 +394,7 @@ class InputTerminal extends BaseInputTerminal { } connect(connector) { super.connect(connector); - var other_output = connector.outputHandle; - if (!other_output) { - return; - } - var otherCollectionType = this._otherCollectionType(other_output); - if (otherCollectionType.isCollection) { - this.setMapOver(otherCollectionType); - } + this.setDefaultMapOver(connector); } attachable(other) { var otherCollectionType = this._otherCollectionType(other); @@ -460,6 +462,10 @@ class InputParameterTerminal extends BaseInputTerminal { this.type = input.type; this.optional = input.optional; } + connect(connector) { + super.connect(connector); + this.setDefaultMapOver(connector); + } effectiveType(parameterType) { return parameterType == "select" ? "text" : parameterType; }