Questions tagged [fabricjs2]

For questions about programming problems with version 2 of the Fabric.js framework. Use [fabricjs] if your question isn't version dependent.

This tags refers to the version 2 of Fabric.js
Fabric.js makes easy to work with elements.

Have a look at the 2.0 changelog for breaking changes and extra features from previous version,
or visit the for more tagged questions.

Fabric.js also supports subclassing, touch devices and Node.js

Additional Resources:

122 questions
0
votes
0 answers

Set object drag limit to a circle in Fabric.js

This question has been asked here. But instead of a rectangular boundary, I want it to be a circle I tried working around on one of the answers from the previous question. Here's its fiddle link. But haven't accomplished anything. var boundingBox =…
JetDiv
  • 1
0
votes
1 answer

Fabricjs v2.4.1 loadFromJSON generated from v1.7.17 image scaling issues

I've a JSON object that defines an image on the canvas like so: The JSON was created from Fabricjs version 1.7.17 and I'm loading that JSON into a canvas made from Fabricjs versions 2.3.6 & 2.4.1 and this is what the image looks like: The canvas…
JoeManFoo
  • 339
  • 3
  • 11
0
votes
3 answers

How to create a fabric object on the node server?

I'm working on an application, in which user creates a series of canvases in their browser (using fabricjs for that purpose). The data are stored in a database, which then are planned to be used on the server side (nodejs) to generate PNG images of…
qwrtln
  • 281
  • 2
  • 12
0
votes
0 answers

fabric 2.0: how to set/get hyper link to the substring of the Textbox

I have Textbox with text "This is google.com", I want to set hyper link to only word "google.com" not the whole textbox text. How do I set/get hyper link to the substring? var canvas = new fabric.Canvas('c'); var urlText = new…
Yuyutsu
  • 2,509
  • 22
  • 38
0
votes
1 answer

Fabricjs 2.0 How to set underline to substring of the Textbox

I have Textbox with text "This is test textbox", i want to set underline to only word "test" not the whole textbox text. How do i set underline to the substring? fabricjs issue var canvas = new fabric.Canvas('c'); var underlineText = new…
Yuyutsu
  • 2,509
  • 22
  • 38
0
votes
1 answer

Can't manage object alignments selection with FabricJs 2

I used to manage object alignments selection on FabricJS with getActiveGroup as below : canvas.on("selection:created", function(e) { var activeObj = canvas.getActiveObject(); console.log('e.target.type', e.target.type); if(activeObj.type…
kabrice
  • 1,475
  • 6
  • 27
  • 51
0
votes
0 answers

how to implement floodfill algorithm using fabricjs?

I have an algorithm for Floodfilling a canvas. Im trying to incorporate this with fabricJS. So here is the dilemna.... I create a fabric.Canvas(). Which creates a wrapper canvas and also an upper-canvas canvas. I click on the canvas to apply my…
0
votes
1 answer

Can not restore saved multi selection in FabricJS

Can you help me figure out what is going on here. Basically I want to use FabricJS with ReactJS and Redux. I want to store the currently selected objects in redux store. But it seems it has a weird behavior when it comes to saving the active objects…
Jplus2
  • 2,216
  • 2
  • 28
  • 49
0
votes
1 answer

FabricJS 2 - Image isn't stretching to the given width

I have just upgraded from fabric 1.7 to 2 and now the image object is behaving differently.See the screenshot, the image where the arrow is is completely ignoring the fact that i set a width on it, it looks like it's actually scaling it based on the…
Glen Elkins
  • 867
  • 9
  • 30
0
votes
0 answers

How to show object controls outside the canvas using fabricjs2

I want to show object's control outside the canvas. I don't want to clip any object in clipping area. I just show the object control outside the canvas then I can move forward to make another functionality which is depends on it. Any solution for…
Apple Dev
  • 35
  • 9
0
votes
2 answers

guide points polygon creation

I am trying to help my users in the creation of a polygon, using circles in the vertices of said polygon. I know how to add the circles, but I do not see how to eliminate them at the end of the creation of the polygon with the double click, it…
Pedro Jose
  • 442
  • 3
  • 19
0
votes
2 answers

delete group / all selected objects in fabric js

I am trying to delete group in fabric js (version: 2.0.0-beta.7). But its only work for single object, so how to fix it so it can delete all selected objects? $('.delete_object').click(function(){ var activeObject = canvas.getActiveObject(); …
DS9
  • 2,995
  • 4
  • 52
  • 102
0
votes
1 answer

Draw Poligon FabricJS 2.0

In previous versions of fabricjs, I have the following function that helps me to draw a polygon at the click of a mouse, and it was done correctly. function draw_polygon(){ //I define the variables that I need var mode = "add",…
Pedro Jose
  • 442
  • 3
  • 19
0
votes
1 answer

Limit Area Pan Fabircjs

I have a canvas, which is infinite right now, I can make PAN up to the coordinates that I want. But our users, are lost after an intense use of it, because they can not find the objects. I want to implement a limit that the user puts in the…
Pedro Jose
  • 442
  • 3
  • 19
0
votes
1 answer

Calculate hue rotation in fabric js

How to we calculate rotation parameter value(-1 to 1) in Hue Rotation Filter in fabricjs from normal hue degree value(0-360)? How does fabricjs calculate the rotation value in the Hue Rotation filter?
infinitywarior
  • 379
  • 4
  • 16
1 2 3
8
9