Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

abdulrehman176617's avatar

fabric.js responsiveness

Hi, I am using fabric.js to create an image edit library but its not responsive . please some can help

0 likes
1 reply
abdulrehman176617's avatar

fabric.Image.fromURL(linkImage, (image) => { editor.canvas.clear(); setContainerHeight(image.height); setContainerWidth(image.width); editor.canvas.setWidth(containerWidth); editor.canvas.setHeight(containerHeight); editor.canvas.setZoom(1); editor.canvas.setBackgroundImage( image, editor.canvas.renderAll.bind(editor.canvas) ); });

this a part of my code

i have spend a lot of time but not able to achieve it

Please or to participate in this conversation.