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
1
vote
0 answers

Adding Text to Objects During Zooming

I am evaluating fabricjs and wondering if you can dynamically add text to shapes while you are zooming. So for example while zoomed out, the shapes are too small to show the text but as you zoom and they get to a certain size, the text can be…
1
vote
1 answer

FabricJS selection handling multiple objects

I am struggling with handling the selection of multiple objects. The desired behaviour would be that each object that is clicked will be added to the current selection. Similar to holding shift-key, but also selections using the drag-options should…
1
vote
0 answers

FabricJS : How do create a magnifying glass lens effect that displays both the background image and canvas objects in the lens

I'm trying to implement zoom feature which not only zooms on the background image but also displays the FabricJS objects (Triangle and Circle)present on the canvas. Currently what I have achieved is the magnified image displays correctly but I also…
1
vote
1 answer

react-fabricjs TypeError: Cannot read property 'bool' of undefined

I am trying to evaluate react-fabricjs package but it seems doesn't work with current React 16.12.0 version. The error I am getting is : TypeError: Cannot read property 'bool' of undefined in /./src/StaticCanvas.jsx?:414:40 followed by bunch of…
Jim
  • 2,760
  • 8
  • 42
  • 66
1
vote
0 answers

Problem with multi select on Fabric canvas elements

I have canvas having many objects. I have to group the selected objects into one group ex: if there are 6 object, if the user click the first object and then the second object, then the first and second should be grouped into single selection and if…
ajith kumar
  • 301
  • 1
  • 9
  • 20
1
vote
0 answers

angular 6 with Fabricjs update polyline points error

I am using angular 6 with fabricjs 2.6 for a connector app where object connects with a polyline. After updating polyline points, I am unable to select the connector line or disappear on canvas zoom. I already used the setCoords method, but can't…
1
vote
0 answers

Fabricjs ignore transparent objects inside group

I would like to know if it's possible to 'ignore' transparent objects. The idea is that if I draw over another object, the drawing path will group with the underlying object (this works). Now I want the free drawing path only visible inside the…
roapp
  • 530
  • 6
  • 17
1
vote
1 answer

Change control fill color while scaling object in Fabricjs

For a few days now, I have been trying to change the fill color of the control that is scaling an object. Here is a gif of what I'm talking about: I would like some guidance on how to achieve this. I have been digging through Fabricjs…
mbejda
  • 1,471
  • 16
  • 25
1
vote
0 answers

$.focus() doesn't work when focus is on html canvas (with fabricjs)

So i have a text element on the canvas with fabricjs, when clicked on the text box some jquery fires and part of that code is supposed to push the cursor focus to a textarea while maintaining the active canvas object (the object stays selected just…
Glen Elkins
  • 867
  • 9
  • 30
1
vote
1 answer

FabricJS: Issue in the selection of shapes angular 6

Currently, I'm working on fabricjs where I'm drawing a different shape. When I do so the shapes are drawn perfectly fine but when I switch to selection mode I'm not able to select the shape. But, when I draw a lot of shapes and select them all…
Abhishek Ekaanth
  • 2,511
  • 2
  • 19
  • 40
1
vote
1 answer

How to mapping "letter-spacing" value from text node of SVG to "charSpacing" property of fabric.TextBox in FabricJS?

I have problem with how to re-presentation of node in SVG with "letter-spacing" in SVG document to fabric.TextBox. In file SVG text node is:
Tho Bui Ngoc
  • 763
  • 1
  • 11
  • 36
1
vote
0 answers

How to create an Editable Text which is curved along a Path in Fabricjs?

I want to make Editable Text which is curved along a fabric.Path as bellow expected image. Here is my code: I created a curved fabric.Path & a fabric.TextBox, but I don't know how to curve text along that Path. Please help me resolve this problem.…
Tho Bui Ngoc
  • 763
  • 1
  • 11
  • 36
1
vote
1 answer

outline and border in fabricjs

I am using fabric.js for canvas shapes. but now i have to add border with outline on these shapes like below. How it is possible in fabricjs??. Or do we have any other js library to get same output? I want below output:
sunil
  • 33
  • 10
1
vote
1 answer

How to optimize display & interactive with large svg image without Lag in FabricJS

I have a fabricJS editor with some large svg files, therefore, when I interactive with ( move / drag ) items on the editor I fill it very lag & heavy. How to optimize using large svg files with fabricJS ? big_image_1.svg: 4.4MB big_image_2.svg:…
Tho Bui Ngoc
  • 763
  • 1
  • 11
  • 36
1
vote
1 answer

How to set absolute position for each item in IText Fabricjs

Please help me, how to set absolute position of each text item in IText Fabricjs. In this example, I want text "KÍNH MỜI" is align horizontal center with below text. Expected Result: Actual Result: Here is my code: var canvasObject =…
Tho Bui Ngoc
  • 763
  • 1
  • 11
  • 36
1 2
3
8 9