Swap widget (4.16) is working fine. When finished, I want to give the user an option to remove the swipe and bring then map view as it was before swipe. I tried
swipe.visibleElements = {
divider: false,
handle: false // handle will not display
}
swipe.destroy(); .
Still the handle and divider are visible. How can I remove the swipe and refresh the view please/ Thanks.
Solved! Go to Solution.
Swipe.destroy() should work to remove the swipe widget from the view.
Here's an example - https://codepen.io/annefitz/pen/dyXGxqz
You can also try setting swipe.view to null. This should remove the swipe widget from the view without destroying the Swipe widget completely. Hope this helps!
Swipe.destroy() should work to remove the swipe widget from the view.
Here's an example - https://codepen.io/annefitz/pen/dyXGxqz
You can also try setting swipe.view to null. This should remove the swipe widget from the view without destroying the Swipe widget completely. Hope this helps!