#2243: added javascript method to allow repainting the formula when we change the model (relevant when using the mathjax view together with the simplifier).