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
2
votes
1 answer

How to increase touch area control points on mobile device ( not increase display size of control points ) in fabricjs?

How to increase touch area of control points on mobile device with FabricJS? Because on mobile they are too small for smooth interactive with. But not change size of control points ( for nice view ). Here is my code: How to increase interactive of…
Tho Bui Ngoc
  • 763
  • 1
  • 11
  • 36
2
votes
1 answer

FabricJS not render SVG correct when SVG include text with custom font?

I have a problem with render SVG in fabricjs when SVG include text with custom font. How to make SVG in Fabricjs display correct with custom font? Here is my code: var canvasObject = document.getElementById("editorCanvas"); // set canvas…
Tho Bui Ngoc
  • 763
  • 1
  • 11
  • 36
2
votes
0 answers

Load SVG as clipPath with border - fabricjs

I need to delimit the canvas with an SVG. Before I had it with clipTo and it worked fine, but we have updated the version to the 2.3.4 of Fabric.js and clipTo no longer works, and recommend ClipPath. When doing it with ClipPath it does it correctly,…
2
votes
2 answers

FabricJS Can't Apply Filters To Large Image Due To "Max Texture Size"

I could do with some help to understand what fabric means by: Max Texture Size: 16,384 - 16,384 what? The image i used is 5MP (2560 x 1920) and trying to apply a filter to the image like this: object.filters.push(new…
Glen Elkins
  • 867
  • 9
  • 30
2
votes
1 answer

Copy & paste custom FabricJS object

I'm trying to copy & paste objects in my FabricJS project. It's FabricJS version 2.3.3 With native FabricJS objects it works fine. Exactly like in the demo (http://fabricjs.com/copypaste). But after I created my custom Class (like here for example…
Enriqe
  • 567
  • 1
  • 6
  • 22
2
votes
1 answer

fabricjs: v2.2.1 Where are SVG paths stored on fabric object if only a single path exists on SVG

I am upgrading fabricjs in my app from version 1.7.22 to 2.2.1. I am mainly working with SVG objects that I am creating in Illustrator. Then in the app I am manipulating paths within the SVG objects. In v1.7.22, the svg paths would be under a…
Serks
  • 333
  • 2
  • 21
2
votes
1 answer

How can I "highlight" object programatically, without actually "selecting" the object

So I have this situation: I have an object in the canvas which is deselected. I would like to show the object's controls (handles and borders) to give the appearance of it being "highlighted" but not actually selecting the object (meaning not doing…
faniva
  • 320
  • 2
  • 10
2
votes
0 answers

fabricjs apply filter on base64 datasource on mobile

I'm uploading a picture via an input type="file" and I get a picture in base64: I apply a filter on it in fabricjs like this: var filter = new…
schaffioverflow
  • 510
  • 3
  • 14
1
vote
2 answers

Implementation of fabric.js in react

I am trying to implement fabric.js in react. I have js code of drawing line using fabric.js and I want to convert it into react code. can anyone help me here is my js code. It is running fine in pure js but not react.; let canvas = new…
1
vote
1 answer

How to identify the objects color on fabricjs

I have a canvas (with fabricjs working on) where I put rectangles of different colors but with the 50% opacity of the fill color by default. At the end, I want to set the opacity of every rectangle selected to 100% with the respective color. I'm…
1
vote
0 answers

`How to get the relative position of the sub item contained in 'activeselection' in fabricjs'?

Fabricjs version: v4.6.0 const selection = new fabric.ActiveSelection(objs, { canvas }) const childs = selection.getObjects() console.log('first child position:', childs[0].left, childs[1].top) // -120, -243.5 The 'left' or 'top' I get is…
glk
  • 11
  • 2
1
vote
1 answer

Select text of IText on FabricJS

I want set the text selection by code in FabricJS like the image. When I create the IText object I need to select all text to facilitate the editing. I check the documentation, but no success.
Marlos Carmo
  • 972
  • 1
  • 8
  • 13
1
vote
0 answers

Fabric.js - How to set values for Multiple Active Object?

I want to clone some objects. 1- How can I clone multiple active objects? (The way I use: I am creating a group from selected objects first. Clone this Group and Ungroup back to their original state. Is there any better way that I couldn't find yet…
1
vote
0 answers

I have used Clipping Now I Want to Restrict the movement of of Image after it cross the rectangle right corner or bottom of rectangle in fabric Js

I am new to Fabric and I have created a Rectangular shape and clipTo function for image and now i want to restrict the image in shape area. Top and left is working fine but right and bottom is not smooth. please…
1
vote
0 answers

Touch Selection on mobile fires move event

When selecting an object on a mobile device with a touch a move event is instantly fired and the object shifts. Is there a way do set a delay on these touch selection events so that a user must either hold the object for a few milliseconds before…
BillEnsley
  • 11
  • 1
1
2
3
8 9