Remove Swipe

396
1
Jump to solution
10-15-2020 11:56 AM
cadgism
Occasional Contributor

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.

0 Kudos
1 Solution

Accepted Solutions
AnneFitz
Esri Contributor

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!

View solution in original post

0 Kudos
1 Reply
AnneFitz
Esri Contributor

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!

0 Kudos