Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!