russellsamora / scrollama

Scrollytelling with IntersectionObserver.

Home Page:https://russellsamora.github.io/scrollama/basic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove visual debugging tool on instance destruction?

ivanbacher opened this issue · comments

commented

Should the visual debugging tool also be removed when calling scroller.destory()?

Not that important, but maybe something to keep in mind for v3.

This is probably also more applicable when using single pages applications like vue, aurelia, svelte ....

Pretty simple to remove the visual debuggers at the moment, but one more thing to remember:

window.document.body
      .querySelectorAll('.scrollama__debug-step')
      .forEach(el => el.remove())