Questions tagged [fabricjs]
Fabric.js is an HTML5 canvas library, providing an object model for canvases, an SVG-to-canvas renderer and a canvas-to-SVG parser.
fabricjs
4,674
questions
-1
votes
1
answer
30
views
Puzzle Vector Graphics with React [closed]
I am trying to build a site that will allow a user to upload an image and then the image is split into puzzle pieces that will be programmatically moved. I tried using Paper JS and Fabric JS to cut ...
0
votes
0
answers
38
views
fabric.js-What's the viewport of a canvas?
I'd like to ask, if I put a canvas inside a div container, what is the viewport of the canvas? Is it the div? I don't understand what 'viewportTransform' refers to as the viewport.
<div id="...
0
votes
1
answer
36
views
Why are viewportTransform[4] and viewportTransform[5] always negative when using zoomToPoint for zooming in Fabric.js?
<script src="https://unpkg.com/[email protected]/dist/fabric.min.js"></script>
<style>
canvas {
border: 1px rgb(0, 0, 0) ;
}
</style>
</head>
<...
0
votes
0
answers
35
views
fabric.js-When to use "setCoords" method?
In fabric.js, when should the 'setCoords' method be used? Is it necessary to use 'setCoords' method after the 'set' method? For example, if I use the 'set' method to change the width of a rectangle, ...
0
votes
0
answers
30
views
fabric.js-How to zoom in based on the mouse focus point and zoom out centered on the canvas?
fabric.js
I've encountered a problem where, after I zoom into the canvas using the cursor focus point (as shown by the blue dot in the first image), and then move the cursor to another position to ...
0
votes
1
answer
36
views
Add FabricJS Canva on top of a video
I want to add a FabricJS canvas on top of a video but I am unable to set the canvas position property to "absolute".
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/4.5....
0
votes
0
answers
31
views
Fabricjs Handling events when items positions are recalculated
i need to have two "buttons" on a canvas with a mousedown event for each button.
const canvas = new fabric.Canvas("myCanvas");
const hoverLabel = document.getElementById('hoverLabel');
...
0
votes
1
answer
122
views
fabric.js-How to select the inside rectangle?
I have two rectangles. The red one seems to be inside the green one. I want to click the red one, but the mouse:down handler returns the options.target as the green one. How can I solve this problem?
...
0
votes
1
answer
58
views
fabric.js-adding an event handler to an object doesn't work
When I click the rect, the console only prints click the canvas instead of click the rect. Is there any solution?
var canvas = window._canvas = new fabric.Canvas('c');
var rect = new fabric.Rect({...
0
votes
0
answers
19
views
How to get a fabric.js IText object from JSON representation of the IText object?
I have a JSON object that represents an IText object, which I've got from canvas JSON representation. I want to be able to make this text field active, or get the text field itself as an IText object. ...
0
votes
1
answer
41
views
FabricJS Adding TAB character to a Textbox
I am trying to implement a way to add a TAB character (or even multiple spacebar characters) when the TAB key is pressed while editing a Textbox.
Unfortunately, I have two solutions and neither seems ...
0
votes
1
answer
52
views
Length measurement in FabricJs same as Acrobat reader use
I need to make custom lenght-measurement object in Fabricjs and Angular same as Acrobat reader use. Also I need to keep functionality how length is measured in Acrobat for small distances. ...
1
vote
1
answer
44
views
How to change the image URL in fabric.js
After adding an image to my canvas (and letting fabric.js do it's thing), I want to change the URL of the image.
The issue is, it only part works. After I click a button (which makes the coding change)...
0
votes
0
answers
16
views
Apply 3D luts .cube files into an image/object from fabricjs
does anyone has an idea how to create a custom filter in fabricjs using GLSL so I can apply .cube filters to the object?
0
votes
0
answers
15
views
How to represent fraction text value like ⅑ but with a straight divider like given in the image?
I am using fabric js textbox and on a click of a button a fraction string gets added to the textbox, Currently as a workaround I'm showing fractions like ⅑ but I have to represent the fractions with a ...