Format MathML equations before submission to the GraphControl (#926)
* Format richedit input * fix spelling error
This commit is contained in:
committed by
Stephanie Anderl
parent
c8a67eb574
commit
397c180d52
@@ -859,6 +859,13 @@ String ^ Grapher::ConvertToLinear(String ^ mmlString)
|
||||
return ref new String(linearExpression.c_str());
|
||||
}
|
||||
|
||||
String ^ Grapher::FormatMathML(String ^ mmlString)
|
||||
{
|
||||
auto expression = m_solver->ParseInput(mmlString->Data());
|
||||
auto formattedExpression = m_solver->Serialize(expression.get());
|
||||
return ref new String(formattedExpression.c_str());
|
||||
}
|
||||
|
||||
void Grapher::OnAxesColorPropertyChanged(Windows::UI::Color /*oldValue*/, Windows::UI::Color newValue)
|
||||
{
|
||||
if (m_graph)
|
||||
|
@@ -104,6 +104,7 @@ public
|
||||
event Windows::Foundation::EventHandler<Windows::Foundation::Collections::IMap<Platform::String ^, double> ^> ^ VariablesUpdated;
|
||||
void SetVariable(Platform::String ^ variableName, double newValue);
|
||||
Platform::String ^ ConvertToLinear(Platform::String ^ mmlString);
|
||||
Platform::String ^ FormatMathML(Platform::String ^ mmlString);
|
||||
|
||||
/// <summary>
|
||||
/// Draw the graph. Call this method if you add or modify an equation.
|
||||
|
Reference in New Issue
Block a user