TypeError: Cannot read properties of undefined (reading ‘getRetinaScaling’) – How to Resolve?
I’m working on image cropping using the latest Fabric.js. Initially, when a user adds an image to the canvas, I call the getImgPolarId() function and store the image data in the currentImg global variable. When the user double-clicks on the canvas, I call the applyCropToImage() function. In this function, I create a backgroundImg with the same state as currentImg, setting the original image as that backgroundImg. I then apply a clipPath to the original image. After clicking on the canvas, I generate a new image that includes only the clipped portion. When applying the crop again, I want to remove the base URL image from the canvas and use the original image again, but I’m encountering an error like…