Snap.js
Snap.js copied to clipboard
Event 'close' doesn't fire when dragged to close
When I drag to close, the close
event is not fired. It only happens when I tap to close, or when it's called.
In the docs it says "close
: Fired when close is called directly or if tapToClose is set to true" - Why doesn't this also fire off when they drag to close? That seems odd. It should fire when the pane is closed, no matter how it is closed. Is there any work around for this?
I am also having this issue
+1
A workaround I'm using now is the 'animate' event:
snapper.on('animated', () => {
let snapState = snapper.state().state;
if (snapState.left || snapState.right) console.log('open')
});