Closed anraiki closed 5 years ago
I have a event listening for when the browser resizes to change the state of the app.
window.addEventListener("resize", _.debounce(() => { if(window.innerWidth > 1920) { let scale_height = window.innerWidth * 0.565; this.setState({scale_height: scale_height}); } else { this.setState({scale_height: "100vh"}); } },500));
This updates the height for elements in the page and in turn also updates the duration.
The duration updates on the new state but doesn't refreshes unless you actually refresh the page.
From what I understand, I may need to update the duration from the event listener.
Related issue: https://github.com/janpaepke/ScrollMagic/issues/105
Is it possible to update the duration on a new state change?
+1 Doesn't work for me either. Any ideas how to solve this?
+1 Running into the same issue.
The duration now can be changed on-the-fly. Means it now reacts to an prop update.
I have a event listening for when the browser resizes to change the state of the app.
This updates the height for elements in the page and in turn also updates the duration.
The duration updates on the new state but doesn't refreshes unless you actually refresh the page.
From what I understand, I may need to update the duration from the event listener.
Related issue: https://github.com/janpaepke/ScrollMagic/issues/105
Is it possible to update the duration on a new state change?