Hello all:
I am dynamically adding elements to a canvas via drag/drop and then using drag/drop to nest elements inside of groups.
What I find is that endpoints do not stay with the element. Seems like my endpoints are staying behind in the parent div even though the element I am dropping on the group is having it's dom added to the group.
An example for clarity.
If I start with a canvas that has a rectangle with endpoints on the top and bottom, and a single group container.
<div>
<div class="rectangle" />
<div class="endpoint" />
<div class="endpoint" />
<div class="group" />
</div>
After I drag the rectangle onto the group, I see the dom change to this:
<div>
<div class="endpoint" />
<div class="endpoint" />
<div class="group">
<div class="rectangle" />
</div>
</div>
Is there something I need to override to make sure the endpoints (and anything else that belongs to an element) are properly migrated in the DOM?
The problem this is causing (right now) is that ordering doesn't work. The rectangle inside the group should always appear on top of the group (along with its endpoints), but what I'm experiencing is that the endpoints are left underneath the group.
Thanks,
Will