Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove useless input port in start node. #169

Merged
merged 1 commit into from
Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,29 @@ public IEnumerable<X6Port> GetOutPorts(JsonObject activity)
public IEnumerable<X6Port> GetInPorts(JsonObject activity)
{
var displaySettings = _activityDisplaySettingsRegistry.GetSettings(activity.GetTypeName());

// Create default input port.
yield return new X6Port
var activityType = activity.GetTypeName();
var activityVersion = activity.GetVersion();
var activityDescriptor = _activityRegistry.Find(activityType, activityVersion)!;

var ports = new List<X6Port>();
// Create default output port, except for terminal nodes.
var isStart = activityDescriptor.IsStart;
if (!isStart)
{
Id = "In",
Group = "in",
Attrs = new X6Attrs
// Create default input port.
ports.Add(new X6Port
{
["circle"] = new X6Attrs
Id = "In",
Group = "in",
Attrs = new X6Attrs
{
["stroke"] = displaySettings.Color,
["circle"] = new X6Attrs
{
["stroke"] = displaySettings.Color,
}
}
}
};
});
}
return ports;
}
}