Skip to content

Commit

Permalink
VisualComposer should have public method AddChildren (#431)
Browse files Browse the repository at this point in the history
* Create draft PR for #430

* Public method AddChildren added

---------

Co-authored-by: TK <61820360+TomKovac@users.noreply.github.com>
  • Loading branch information
IX-BOT and TomKovac authored Oct 1, 2024
1 parent bfee7f3 commit 823724e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.Xml.Linq;
using System.Drawing;
using static System.Net.Mime.MediaTypeNames;
using AXOpen.VisualComposer.Types;

namespace AXOpen.VisualComposer
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 823724e

Please sign in to comment.