4,645 questions
1 vote
0 answers
59 views
HTML to FabricJS conversion
I'm working on converting HTML into FabricJS objects on a canvas. I want to take arbitrary HTML and translate its visual elements into corresponding FabricJS primitives (Textbox, Rect, Circle, Image, ...
0 votes
0 answers
22 views
Fabricjs relative position to group
I do not understand this relative positions in FabricJs. The docu is simple to understand, it states that setRelativeX sets the position relative to the parent, like a group. I try to use that but the ...
1 vote
2 answers
76 views
Fabric js is not doing anything in the canvas
I tried to use the Fabric.js library to draw on the HTML5 canvas, but it does not do anything. It is an Angular 19 project. This code should be enough to use Fabric? ngAfterViewInit() { ...
0 votes
0 answers
76 views
How to apply Blur to fabric.js v6 object
I'm adding fabric rect like this: import * as fabric from 'fabric'; addBlurBox() { const rect = new fabric.Rect({ left: 100, top: 100, width: 200, height: 150, fill: '...
0 votes
0 answers
57 views
How can I replicate canva.com group functionality in fabric js
For those of you who have worked with Fabric.js, I'm building an editor and I'm trying to replicate the selection and editing behavior that canva.com has — especially how it treats groups and text ...
0 votes
0 answers
41 views
How can I replace setViewportTransform with setZoom and absolutePan in Fabric JS v5?
I'm trying to understand the relationship between setViewportTransform vs. setZoom and absolutePan. Sadly the documentation on this seems very brief and doesn't have my answer. I have some code that ...
0 votes
1 answer
274 views
How to properly import Fabric.js in Vite (Vue 3 + Fabric 6.7) — Canvas is undefined
I’m building a Vue 3 project with Vite, and trying to integrate fabric.js (v6.7.0) to allow drawing on a PDF rendered using pdf.js. Here’s the problem: I installed fabric via: npm install fabric Then ...
0 votes
0 answers
28 views
Mouse wheel deltaY is 0 when scrolling vertically in MAUI Blazor WebView with Fabric.js canvas
I'm experiencing an issue with mouse wheel/trackpad scrolling events in a MAUI Blazor app that contains a Fabric.js canvas. Problem Description: When scrolling horizontally with a trackpad, the ...
0 votes
0 answers
39 views
FabricJs SVG exporting doesn't support text overline or some property
Fabric.js: Text Properties (Stroke, Shadow, Background) Not Exporting Correctly to SVG I'm using Fabric.js to create and manipulate text objects on a canvas. When I export the canvas content to SVG ...
1 vote
1 answer
71 views
Add a container inside the canvas fabric js using typescript
I need to add a new container with a dynamic image inside the canvas. I checked the code and am new to learn Typescript. So I need a help here. This is render part of the code render() { const { ...
0 votes
0 answers
64 views
fabric js how to "bend" images
I'm trying to achieve a "bent" effect with an image in Fabric.js. Specifically, I want to manipulate the positions of the corners (for example, the top-right and bottom-right corners) of an ...
0 votes
0 answers
31 views
Fabric.js does not produce red square
I am developing a web based application using Dancer2. I want to use Fabric.js to make an interactive drawing. However, I am unable to execute even the simplest drawing. I can make a drawing as a ...
0 votes
0 answers
58 views
Fabric Js crop from left
Im writing a crop functionality for my fabric Js module in Angular. addImage(event: Event) { const input = event.target as HTMLInputElement; if (input.files && input.files[0]) { const file = ...
0 votes
0 answers
148 views
NX Cannot read properties of null (reading 'default')
I was trying to setup fabricjs in my application. since application uses micro-frontends , I use @angular-architects/module-federation for custom builder. when I install fabricjs it breaks otherwise ...
0 votes
0 answers
23 views
How to calculate nested group position in Fabric.js?
I'm working with Fabric.js (v5.3.0) in a Vue3 project and having trouble understanding nested group positioning. Here's my simplified setup: const rect1 = new fabric.Rect({ width: 60, height:...