1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-30 11:40:27 +02:00

no more client-side mathjax

This commit is contained in:
Pomax
2015-12-31 16:08:16 -08:00
parent 83ba8e1bf4
commit d9a0bac687
36 changed files with 3567 additions and 1488 deletions

View File

@@ -8,24 +8,8 @@ var MathJax = (typeof window !== "undefined" ? window.MathJax : false);
if(!MathJax){MathJax={Hub:{Queue:noop}};}
var LaTeX = React.createClass({
getInitialState() {
var data = this.props.children;
if (!data.forEach) data = [data];
return { latex: data.join('') };
},
componentDidMount: function() {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, this.refs.latex, false]);
MathJax.Hub.Queue(this.bindHTML);
},
bindHTML: function() {
this.setState({ html: this.refs.latex.innerHTML });
},
render: function() {
var content = this.state.html ? this.state.html : this.state.latex;
return <p ref="latex" dangerouslySetInnerHTML={{__html: content }} />;
return <p ref="latex">{this.props.children}</p>;
}
});

View File

@@ -1,43 +0,0 @@
whatis: require("./whatis.jsx")
explanation: require("./explanation.jsx"),
control: require("./control.jsx"),
matrix: require("./matrix.jsx"),
decasteljau: require("./decasteljau.jsx"),
flattening: require("./flattening.jsx"),
splitting: require("./splitting.jsx"),
matrixsplit: require("./matrixsplit.jsx"),
reordering: require("./reordering.jsx"),
derivatives: require("./derivatives.jsx"),
pointvectors: require("./pointvectors.jsx"),
components: require("./components.jsx"),
extremities: require("./extremities.jsx"),
boundingbox: require("./boundingbox.jsx"),
aligning: require("./aligning.jsx"),
tightbounds: require("./tightbounds.jsx"),
canonical: require("./canonical.jsx"),
arclength: require("./arclength.jsx"),
arclengthapprox: require("./arclengthapprox.jsx"),
tracing: require("./tracing.jsx"),
intersections: require("./intersections.jsx"),
curveintersection: require("./curveintersection.jsx"),
moulding: require("./moulding.jsx"),
pointcurves: require("./pointcurves.jsx"),
catmullconv: require("./catmullconv.jsx"),
catmullmoulding: require("./catmullmoulding.jsx"),
polybezier: require("./polybezier.jsx"),
shapes: require("./shapes.jsx"),
projections: require("./projections.jsx"),
offsetting: require("./offsetting.jsx"),
graduatedoffset: require("./graduatedoffset.jsx"),
circles: require("./circles.jsx"),
circles_cubic: require("./circles_cubic.jsx"),
arcapproximation: require("./arcapproximation.jsx")