Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

256
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda