Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
generate() {
const t = textures.paths();
[
'size',
'strokeWidth',
'shapeRendering',
'stroke',
'background',
'id',
'd',
].forEach((key) => {
if (this.props[key]) t[key](this.props[key]);
});
const selection = new Selection();
t(selection);
this.setState({
pattern: selection.toReact(this.props.components),
t = textures
.lines()
.thicker()
.strokeWidth(1)
.stroke(d3.rgb(c).brighter(0.6))
.background(c);
break;
case 1:
t = textures
.circles()
.fill(d3.rgb(c).brighter(0.6))
.thicker()
.background(c);
break;
case 2:
t = textures
.paths()
.d('crosses')
.stroke(d3.rgb(c).brighter(0.6))
.background(c)
.lighter()
.thicker();
break;
case 3:
t = textures
.paths()
.d('waves')
.thicker()
.strokeWidth(1)
.stroke(d3.rgb(c).brighter(0.6))
.background(c);
break;