I'm trying to implement this answer on typescript, https://stackoverflow.com/a/47570603/8503317 on create Line, there is this options
var line = new fabric.Line(points, {
strokeWidth: 2,
fill: '#999999',
stroke: '#999999',
originX: 'center',
originY: 'center',
selectable: false,
hasBorders: false,
hasControls: false,
evented: false,
class:'line', //THIS DOESN'T EXIST ON FABRIC.LINE OPTIONS
here's the codepen
But on that codepen, it is working and don't have any error. does anyone knows why?
EDIT
Here's my reproduce https://stackblitz.com/edit/angular-ivy-bkaelf?file=src%2Fapp%2Fapp.component.ts
Since i haven't got any solution, i fix it by manually adding class property to ILineOptions to @types/fabric. it's working now, but it's not the best solution. If you have found the best answer, please post a new answer