Closed SlimRunner closed 3 years ago
The MutationObserver method would work, but I just discovered the following:
Calc.controller.dispatcher.register(e => e.type === 'toggle-add-expression' && console.log(e))
.
Absolutely incredible if it always executes after the dropdown list is made.
The
three
expression type in the add expression context menu stops showing up after toggling the edit list feature in Desmos once.I went ahead and inspected elements and it seems the element referenced here: https://github.com/jared-hughes/DesThree/blob/13a791d65d95b6cf1f75a649772e1506713064e7/src/View.js#L18 for the MutationOverserver to keep track of the context menu gets removed/replaced by Desmos backend.
Maybe a slight modification to the observer could fix the issue. However, do note that this replacement/removal of nodes happens up to three parents above the element previously referenced when hiding and showing the expression panel. This means the safest option would be to track
.dcg-exppanel-container
with a following query to make sure the context menu has appeared.