Relative Content

Tag Archive for reactjsfabricjs

Canvas and its objects not resizing with screen size – fabricjs-react

I’m using fabricjs-react to work with canvas, allowing users to upload an image, drag it around, and save it as JSON. I’ve implemented most functions, but maintaining the aspect ratio of the canvas and its objects isn’t working as expected. Resizing the canvas cuts off the sides, and when loading from JSON, the position isn’t right. I haven’t found any examples that address these issues and could use some assistance.