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

189
Visualizações
fabric.js updating Line coordinates inside of a Group

I have set up the functionality that I want with a regular line using fabric.js. See the code pen below. I can hit the add arrow button to add a line to the canvas and then double click on the line to see 2 circles show up that I can then drag around to move either end of the line.

https://codepen.io/jrabes/pen/KKZEBVe

I want to make this line an arrow with the same functionality. When I add the line and a triangle for the arrow head to a fabric.Group and then try to update the coordinates for the line, the line gets thrown out of the group and I can't select it anymore. I set up a code pen with what I've been trying below.

https://codepen.io/jrabes/pen/VwyRBVp

After double clicking on the line in the group and moving the left circle: after double clicking on the line in the group and moving the left circle
Group selected and still showing original line location after editing line:
group selected and still showing original line location after editing line

I'm not attached to this particular set up at all, so if there is a different/easier way to get an arrow set up with the ability to edit the endpoints I would love that.

about 4 years ago · Juan Pablo Isaza
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