Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

destroy method to remove all observation and disable #47

Closed
russellsamora opened this issue Jan 11, 2018 · 5 comments
Closed

destroy method to remove all observation and disable #47

russellsamora opened this issue Jan 11, 2018 · 5 comments
Assignees

Comments

@russellsamora
Copy link
Owner

No description provided.

@theamnesic
Copy link

Hi!

scrollama.destroy() seems not to work anymore, undefined.
On the other hand scrollama.disable() and scrollama.enable() both work :

image

Any idea?

— G

@russellsamora
Copy link
Owner Author

There is no return value on the function, so undefined is the correct return.

It should have removed all intersectionObserver listeners and not trigger any of the callback functions to update. Is that not happening?

@theamnesic
Copy link

No, it doesn't remove my observers...

Using a basic setup and everything works like a charm, only this destroy method doesn't work.

@russellsamora
Copy link
Owner Author

Ah so the callbacks are still firing? What browser/version are you using?

@theamnesic
Copy link

Sorry, my mistake, scrollama.destroy() works!
I was fooled by the visual debugging tool which did not disappear when destroying (using PJAX) :

image

Maybe this one should be remove/reset too.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants