Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.notches.forEach(function (notch, i) {
if (colors[i] === 'rgb(55,55,55)') {
if (Math.random() > 0.5) {
notch.props.fill = 'rgb(230,230,230)'
} else {
notch.props.fill = 'rgb(130,130,130)'
}
} else {
if (Math.random() > 0.5) {
notch.props.fill = color.interpolateHsl(colors[i], 'rgb(230,230,230)')(0.2)
} else {
notch.props.fill = color.interpolateHsl(colors[i], 'rgb(130,130,130)')(0.2)
}
}
})
}
var angle = Math.atan2(-diff.translation[1], -diff.translation[0]) * 180 / Math.PI
if (angle < 0) angle += 360
angle = angle - 90
if (angle < 0) angle += 360
var offset = -origin.rotation % 360
if (offset < 0) offset += 360
offset = 360 - offset
if (offset === 360) offset = 0
angle -= offset
if (angle < 0) angle += 360
if (radius < 0.01) angle = 0
var fill = color.interpolateHsl('rgb(55,55,55)', target.color)(0.85)
return { angle: angle, radius: radius, fill: fill }
})
}
this.notches.forEach(function (notch, i) {
if (colors[i] === 'rgb(55,55,55)') {
if (Math.random() > 0.5) {
notch.props.fill = 'rgb(230,230,230)'
} else {
notch.props.fill = 'rgb(130,130,130)'
}
} else {
if (Math.random() > 0.5) {
notch.props.fill = color.interpolateHsl(colors[i], 'rgb(230,230,230)')(0.2)
} else {
notch.props.fill = color.interpolateHsl(colors[i], 'rgb(130,130,130)')(0.2)
}
}
})
}