File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -388,6 +388,17 @@ function TransformResults(props) {
388388 } } >
389389 Copy MathML
390390 </ button >
391+ < button
392+ type ="button "
393+ className ="btn btn-outline-primary py-0 "
394+ onClick =${ ( ) => {
395+ // const newLatex = MathML2LaTeX.convert(mathMlString);
396+ var encoded_latex = encodeURIComponent ( props . resString ) ;
397+ var newURL = `https://www.wolframalpha.com/input?i2d=true&i=${ encoded_latex } `
398+ window . open ( newURL , '_blank' ) ;
399+ } } >
400+ Wolfram Alpha
401+ </ button >
391402 </ div >
392403 </ div > `
393404 : html `< button
@@ -1050,6 +1061,7 @@ class Game extends React.Component {
10501061 iprbList=${ this . state . iprbList }
10511062 copiedToast=${ this . copiedToast }
10521063 copiedToastML=${ this . copiedToastML }
1064+ resString=${ this . resString }
10531065 handlePlotChange=${ ( e ) => this . handlePlotChange ( e ) }
10541066 chosen=${ this . state . chosenPlot } />
10551067
Original file line number Diff line number Diff line change @@ -313,13 +313,16 @@ export function calculateMNA(canvasState, chosenPlot) {
313313 //Remove eval: 35ms
314314 //Remove simplify: 15ms
315315 var strOut = Algebrite . eval ( "mna_vo_vi" ) . toString ( ) ; //4ms
316-
316+
317317 // if (iprbNode!=null) console.log('iprb result', Algebrite.eval("iprb").toString() );
318318
319319
320320
321321
322- [ resString , resMathML ] = simplify_algebra ( strOut ) ;
322+ var xyz = simplify_algebra ( strOut ) ;
323+ resString = xyz [ 0 ]
324+ resMathML = xyz [ 1 ]
325+ // [resString, resMathML] = simplify_algebra(strOut);
323326 schematicReadiness . solvable = true ;
324327 } catch ( err ) {
325328 console . log ( "Solving failed with this error:" , err ) ;
You can’t perform that action at this time.
0 commit comments