Intersecting functions with JSXGraph

Recently, I've been getting more and more into JSXGraph. It's an interactive geometry and plotting library that's been around for at least 10 years, while still maintaining a good amount activity and relevance. Which is impressive in the JavaScript world. It's developed at the University of Bayreuth by Alfred Wassermann.

When developing econplayground, some of the functionality requires two functions on a graph: one linear, one non-linear. For the linear function, I can get away with just using a JSXGraph Line, and for the non-linear curve, a Functiongraph.

JSXGraph also supports displaying the Intersection of two lines, calculated dynamically as those lines are moved. You can see how I'm setting all this up here.

Line A is a JSXGraph Line and Line B is a Functiongraph:

In this example, the intersection point disappears when dragging the orange line, or when dragging the blue line to the left.

One workaround is to use a Functiongraph for both lines, suggested by a user on StackOverflow.

Here, both lines are Functiongraphs: