Snap.js icon indicating copy to clipboard operation
Snap.js copied to clipboard

Event 'close' doesn't fire when dragged to close

Open bluetidepro opened this issue 10 years ago • 2 comments

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?

bluetidepro avatar Jun 05 '14 20:06 bluetidepro

I am also having this issue

travisfisher avatar Oct 17 '14 16:10 travisfisher

+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')
});

EvHaus avatar Aug 02 '15 02:08 EvHaus