mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-19 23:12:21 +02:00
all sections ported
This commit is contained in:
@@ -14,6 +14,8 @@ var Bezier = require("bezier-js");
|
||||
|
||||
var Graphic = React.createClass({
|
||||
|
||||
Paper: false,
|
||||
|
||||
defaultWidth: 275,
|
||||
defaultHeight: 275,
|
||||
|
||||
@@ -74,6 +76,11 @@ var Graphic = React.createClass({
|
||||
var ctx = cvs.getContext("2d");
|
||||
this.ctx = ctx;
|
||||
|
||||
if (this.props.paperjs) {
|
||||
var Paper = this.Paper = require("../lib/vendor/paperjs/paper-core");
|
||||
this.project = new Paper.Project(cvs);
|
||||
}
|
||||
|
||||
if (this.props.setup) {
|
||||
this.props.setup(this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user