The code I get this error is: const crop = imageSrc.crop({ x: value.x / ratio_w, y: value.y / ratio_h, width: value.width / ratio_w, height: value.height / ratio_h });
I got this error when I was trying to get a subimage with the x,y, width and height coordinates of the image area to get. In there I declare const [imageSrc, setImageSrc] = useState(null), and I update the value of imageSrc here:
The code I get this error is:
const crop = imageSrc.crop({ x: value.x / ratio_w, y: value.y / ratio_h, width: value.width / ratio_w, height: value.height / ratio_h });
I got this error when I was trying to get a subimage with the x,y, width and height coordinates of the image area to get. In there I declareconst [imageSrc, setImageSrc] = useState(null)
, and I update the value of imageSrc here:According to Konva's documentation, there are instructions: