1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-10-03 03:21:56 +02:00
Files
BezierInfo-2/components/sections/introduction/index.js
2017-02-13 17:27:52 -08:00

38 lines
732 B
JavaScript

var React = require("react");
var Locale = require("../../../lib/locale");
var locale = new Locale("en-GB");
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;