Search code examples
javascriptcoffeescriptframerjs

Framer/Coffeescript: How can I prevent going backwards on a page component?


I guess this is a Framer specific question. I have a page component and I only want you to be able to swipe forwards and not backwards. What's the best way of going about this?


Solution

  • Just delete the page after it changes.

    page.onChange "currentPage", ->
        page.previousPage.destroy() 
    
        page.currentPage.animate 
            backgroundColor: "#FFF"
            options:
                time: 0.5