Reset and undo destroy helperExpression/observe relation

25 views
Skip to first unread message

Andy

unread,
Nov 2, 2023, 11:40:00 PM11/2/23
to desmos-api-discuss
I created a graph with sliders that are observed to update values on the page. I also set up a default state for resetting the graph. When the user resets, the observers are destroyed or disabled (this makes sense for delete all, because the sliders that are observed will be gone). However, the sliders exist in the default state. I’ve managed to work around this by using observeEvent with ‘graphReset’ to catch the reset and have my function reinstate the helperExpressions/observers.

The reset button helpfully puts up a notice, “Graph reset. Press CMD+Z to undo. Undo”. If the Undo link is pressed, the graph returns to its previous state - but without the observers. Is there some way to catch the Undo event to reinstate my helperExpressions/observers?
Reply all
Reply to author
Forward
0 new messages