Methods
Re-instantiate Swapy instance when the DOM is updated.
When you add or remove items or slots from your Swapy container, you need to re-instantiate Swapy to pick up those changes.
You can do that using swapy.update()
.
function afterAdd() {
swapy.update()
}
function afterRemove() {
swapy.update()
}