Most voted "fabric.js" questions
6 questions
Sort by count of
-
5
votes2
answers2626
viewsAdjust image inside canvas
I have a page that allows you to insert an image inside the canvas element and works perfectly. Now, what I need is a way to limit the positioning of the image within the canvas, not allowing it to…
-
2
votes2
answers51
viewsHow to clone an object in Fabricjs?
In Fabricjs, through the function canvas.getActiveObject() it is possible to return the value of the currently active object. I would like to know if there is any way to clone this object and add it…
-
0
votes1
answer32
viewsAdd data to an object/image in Fabricjs
I need to add data to an object in Fabricjs and search for them again when exporting the canvas. Function I use to add an object: function _addImageObject(imageURL) { fabric.util.loadImage(imageURL,…
-
0
votes0
answers11
viewsCanva - Fabric JS - Proportional image inside a container
I need to resize the image with width=100% and height=auto inside the Canvas - Fabric JS. I tried several ways, but without success. jQuery $(document).on('change', '#id_universo_imagem',…
-
0
votes1
answer27
viewsHow to reposition an image, through a matrix with fabricjs?
I have the following matrix for an image: var Matrix = [0.172549, 0, 0.172549, 0, 0]; I would like to position this image with this matrix above, and within the scale of a container: My code: var…
-
0
votes1
answer57
viewsI need to save the image of fabricjs along with the objects
Hello, I’m trying to save the image of Fabric.JS along with the active objects, but I’m having a problem. I’m trying to use the: canvas.toDataURL('image/jpg') But when I try to run this error here…