fabricjs Questions

1

I have a background and an unlimited amount of images or animations where I'd like to mask or clip part of the image or animation to the background. I'd like the user to use or move around a polygo...
Vocalist asked 29/4, 2024 at 15:15

3

Solved

OK, if I have the following shapes that are rotated and then selected you will see their bounding boxes: I am trying to write some code to align objects with respect to each other. So I would lik...
Isfahan asked 15/3, 2017 at 2:36

6

In fabricjs, I want to create a scene in which the object under the mouse rises to the top of the scene in z-index, then once the mouse leaves that object, it goes back to the z-index where it came...
Barrybarrymore asked 3/1, 2013 at 0:5

5

Solved

I have a Canvas Object with top and left attributes defined through with a previous JavaScript function but when I create a fabric Canvas object var fabricCanvas= new fabric.Canvas('mycanvas'); ...
Bop asked 13/2, 2012 at 14:8

9

Solved

I have a simple fabric js based application where I will let users add shapes connect them and animate them. Following is my JS var canvas; window.newAnimation = function(){ canvas = new fabri...
Exhort asked 30/7, 2015 at 14:49

2

Solved

I am creating a product configurator using Vue and FabricJS. I have created a canvas using this.canvas = new fabric.Canvas("canvas"); <template> <div id="wrapper"> <div id="le...
Digestive asked 5/11, 2020 at 12:28

4

Solved

How to implement crop tool on the image that is loaded on the canvas using fabric.js ? I have a image loaded on the canvas .Now i want to implement crop tool where the user is allowed to crop the i...
Faldstool asked 11/9, 2013 at 4:47

3

Solved

I would define a text box (single-line) By default, with a character size of 16 (for example) When the text gets bigger than the text box, I do not want it to wrap or the text box gets bigger, I ...
Phallus asked 22/12, 2016 at 9:32

4

Solved

In this jsfiddle I have a Fabric.js text created with lockRotation: true to avoid rotation. The line disappeared, but the box control to rotate is still there, how to get rid of it? HTML <canv...
Stomachache asked 6/7, 2018 at 15:41

4

Can we blur objects in Canvas with fabricjs like rectangle,polygon.At least soft that objects edges. update: I have an another approach for this, we can blur objects shadow. So Blur object shado...
Techno asked 16/3, 2016 at 12:53

6

Solved

How can I pan and zoom using fabricjs? I've tried using the methods zoomToPoint and setZoom but they do not work for panning. Once I start using different zoom points I start having trouble. $('#z...
Rottenstone asked 26/5, 2015 at 18:36

3

Solved

I'm using FabricJS to create a canvas for drawing specific lines and shapes. One of the lines is a wavy line with an arrow similar to this: I've successfully created a straight version of this w...
Household asked 12/1, 2018 at 9:38

6

Solved

Im trying to add a custom attribute to a fabric js object that i have: var trimLine = new fabric.Rect({ width: Math.round(obj.box_dimensions.box.width,2), height: Math.round(obj.box_dimensions.b...
Stranger asked 19/5, 2015 at 22:7

6

Solved

Is there a way to make a Fabric.js canvas resize with the browser to enable the same result on any device? I'm talking about responsive design. Has anyone a code example?
Ayers asked 21/2, 2014 at 10:10

7

Solved

I've been playing with Fabric.js a lot in the last few weeks, but regarding text fields I've only found it possible to set the text on creation. Is there any possible way to make an interactive te...
Marlanamarlane asked 4/4, 2012 at 10:11

3

Solved

I'd like to use this http://jsfiddle.net/fabricjs/S9sLu/ function where objects can be snapped to grid, the problem is that I don't want it to snap directly to the lines but when it is getting clos...
Newsmonger asked 22/3, 2017 at 17:10

6

Solved

By default fabric.js elements come with 8 points to scale any objects. But the app I'm working specifically requires that stretching should not be allowed on a single axis (horizontally or vertical...
Allophane asked 20/2, 2013 at 2:34

3

Solved

I want to add images/icons to my fabric canvas. The code given on the Fabric demo is not working. fabric.Image.fromURL('my_image.png', function(oImg) { canvas.add(oImg); }); This just makes my ...
Wendellwendi asked 5/2, 2016 at 7:18

2

Solved

I want to save the Fabric canvas as an image (jpg or png is the same) on the pc, by clicking on a button in my html page. I tried a solution but doesn't work: function saveF(canvF) { var imageCanv...
Archetype asked 19/11, 2015 at 14:26

2

For graphic example see GIF at the end ⬇️ I'm using a reactive variable to access a fabricJs canvas. I want to create a rectangle with every double click on the canvas. However, when I create an ob...
Lower asked 17/12, 2022 at 9:28

3

Solved

I am trying to stretch the background image so it can fit the canvas size. But its not working. I have followed this question and based on comment i have implemented the stretching code. Strech ...
Enthronement asked 30/10, 2017 at 8:3

4

Solved

I am working on a project that requires creating multiple canvas elements (separate bars each representing one distinct gradient). I would like to do this dynamically with fabric.js, eg: function...
Malvina asked 15/1, 2015 at 2:43

4

Solved

I have a custom component called ImageContainer, which basically creates a rectangle and applies an image as a fill pattern. When I run function toDataURL on the canvas, I get a js error Uncaugh...
Priority asked 17/5, 2018 at 20:39

2

I would like to get the new point coordinates after object being modified but when i get the points coordinates after being modified they are the same point coordinates with which I have drawn the ...
Proportion asked 25/7, 2016 at 12:6

4

Solved

I want to show object bounding box when mouse hover over objects like this video, how to do that ? I'm using canvas.on('mouse:over') with selectedObj.drawBorders function. However, outline box i...
Varus asked 16/5, 2019 at 15:41

© 2022 - 2025 — McMap. All rights reserved.