Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, { Component } from 'react';
import Color from 'color';
import { useStrictMode, Circle } from 'react-konva';
useStrictMode(true);
/*
The shape's vertecies. Can be dragged to edit the shape.
*/
class ShapeVertex extends Component {
constructor(props) {
super(props);
const luminosity = Color(props.color).luminosity();
this.lightenAmount = 1.8 * (1 - luminosity);
this.defaultRadius = 4;
this.hoverRadius = 6;
this.strokeWidth = 2;
this.state = {
radius: this.defaultRadius,