Implemented functionality for copy node

This commit is contained in:
Ankitkumar Satapara
2026-04-18 20:07:33 +05:30
parent 381e187b6d
commit 7fd70219ea
3 changed files with 119 additions and 4 deletions

View File

@@ -23,12 +23,10 @@ namespace Nodify.Calculator
{
Title = "COPY",
Type = OperationType.System,
OPType = "copy",
sysOp = SystemOperations.COPY,
IsFlowNode = false,
};
copynode.Input.Add("");
copynode.Output.Add("");
copynode.Output.Add("");
var begin = new OperationInfoViewModel()
{
@@ -330,6 +328,20 @@ namespace Nodify.Calculator
SystemOperationType = info.sysOp
};
if (info.sysOp == SystemOperations.COPY)
{
sysOp.Title = info.Title;
// Universal input — accepts any shape. Starts with no outputs.
foreach (var item in input)
{
item.Shape = ConnectorShape.Circle;
item.ConnectorColor = Color.White;
item.IsCopyConnector = true;
sysOp.Input.Add(item);
}
return sysOp;
}
if (info.sysOp == SystemOperations.SPLIT)
{
sysOp.Title = info.Title;