Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

255
Vistas
class doesn't exist in type 'ILineOptions' on fabricjs

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

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

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

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda