mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-10-03 11:31:52 +02:00
38 lines
725 B
JavaScript
38 lines
725 B
JavaScript
var React = require("react");
|
|
|
|
var Locale = require("../../../lib/locale");
|
|
var locale = new Locale();
|
|
var page = "introduction";
|
|
|
|
var Introduction = React.createClass({
|
|
getDefaultProps: function() {
|
|
return {
|
|
title: locale.getTitle(page)
|
|
};
|
|
},
|
|
|
|
drawQuadratic: function(api) {
|
|
var curve = api.getDefaultQuadratic();
|
|
api.setCurve(curve);
|
|
},
|
|
|
|
drawCubic: function(api) {
|
|
var curve = api.getDefaultCubic();
|
|
api.setCurve(curve);
|
|
},
|
|
|
|
drawCurve: function(api, curve) {
|
|
api.reset();
|
|
api.drawSkeleton(curve);
|
|
api.drawCurve(curve);
|
|
},
|
|
|
|
render: function() {
|
|
return (
|
|
<section>{ locale.getContent(page, this) }</section>
|
|
);
|
|
}
|
|
});
|
|
|
|
module.exports = Introduction;
|