diff --git a/src/base/src/AXOpen.VisualComposer/VisualComposerContainer.razor.cs b/src/base/src/AXOpen.VisualComposer/VisualComposerContainer.razor.cs index 6f360a3c..a7dff3a8 100644 --- a/src/base/src/AXOpen.VisualComposer/VisualComposerContainer.razor.cs +++ b/src/base/src/AXOpen.VisualComposer/VisualComposerContainer.razor.cs @@ -10,6 +10,7 @@ using System.Xml.Linq; using System.Drawing; using static System.Net.Mime.MediaTypeNames; +using AXOpen.VisualComposer.Types; namespace AXOpen.VisualComposer { @@ -153,6 +154,12 @@ public async Task AddChildrenAsync(ITwinElement item) await SaveAsync(); } + public void AddChildren(ITwinElement item, double left, double top, TransformType transform, string presentation, double width, double height, int zIndex, double scale, string roles, string? presentationTemplate, bool background, string backgroundColor) + { + _children.Add(new VisualComposerItemData( EventCallback.Factory.Create(this, StateHasChanged),EventCallback.Factory.Create(this, SaveAsync), item, item.Symbol.ModalIdHelper(), + Guid.NewGuid(), left, top, transform, presentation, width, height, zIndex, scale, roles, presentationTemplate, background, backgroundColor)); + } + public async Task RemoveChildrenAsync(VisualComposerItemData item) { _children.Remove(item);