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

140
Views
Click event in shape in canvas only triggering in the original position after rotate

I'm using konvajs to draw and use canvas with shapes inside where each have a click listener.

I have a scenario where I need to rotate the entire canvas. Issue is that when I do rotate the canvas container, the event listener for the shapes is kept in the original position.

Surprisingly I don't see the same behavior for when I translate the canvas - I would expect to see the same behavior as the shapes change position.

Have a reproducible example here: https://codesandbox.io/s/broken-wave-r4f7i7

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Konva doesn't support transforming of container with CSS. It can't calculate pointer position correctly in that case.

If you need to rotate/scale canvas, please use Konva methods.

stage.rotation(90);

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