Changeset 13984


Ignore:
Timestamp:
07/03/16 19:24:26 (5 years ago)
Author:
gkronber
Message:

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

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/MathSymbolicDataAnalysisModelView.cs

    r13933 r13984  
    6161        HtmlElement newElement = webBrowser.Document.GetElementById("model");
    6262        newElement.InnerText = formatter.Format(Content.SymbolicExpressionTree);
     63        webBrowser.Document.InvokeScript("refreshModel");
    6364      } else {
    6465        HtmlElement newElement = webBrowser.Document.GetElementById("model");
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/displayModelFrame.html

    r13933 r13984  
    2626            src="./MathJax/MathJax.js?config=TeX-AMS_SVG&locale=en">
    2727    </script>
     28    <script type="text/javascript">
     29        <!-- necessary to re-typeset when the model is changed-->
     30        function refreshModel() {
     31            var model = document.getElementById("model");
     32            <!-- see https://docs.mathjax.org/en/v1.1-latest/typeset.html -->
     33            MathJax.Hub.Queue(["Typeset",MathJax.Hub,model]);
     34        }
     35    </script>
    2836</head>
    2937<body id="body">
Note: See TracChangeset for help on using the changeset viewer.