1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-28 18:49:57 +02:00
This commit is contained in:
Pomax
2016-01-12 13:39:35 -08:00
parent 98bb8d5a86
commit 8db94a3f50
26 changed files with 129 additions and 93 deletions

View File

@@ -252,7 +252,7 @@ var Graphic = React.createClass({
setCurve: function(c) {
var pts = [];
c = (typeof c === "array") ? c : Array.prototype.slice.call(arguments);
c = (c instanceof Array) ? c : Array.prototype.slice.call(arguments);
c.forEach(nc => {
pts = pts.concat(nc.points);
});
@@ -380,7 +380,7 @@ var Graphic = React.createClass({
},
drawHull: function(curve, t, offset) {
var hull = typeof curve === "array" ? curve : curve.hull(t);
var hull = (curve instanceof Array) ? curve : curve.hull(t);
if(hull.length === 6) {
this.drawLine(hull[0], hull[1], offset);
this.drawLine(hull[1], hull[2], offset);