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

189
Views
Fabric.js: pinch to zoom bad stuttering

I am trying to enable smooth pinch to zoom on mobile devices on my fabric.js canvas. I have a solution that technically works, the problem is that it is very stuttery, the zoom happens in distinct stages, almost frame by frame, so it is not a good experience. It also seems to get worse as time goes on. Is there any way I can make it stutter less and scale more smoothly? I am testing on a good smartphone.

Here is the code:

canvas.on('touch:gesture',function(event) {
        if (event.e.touches && event.e.touches.length == 2) {
          if (event.self.state == "start") {
            zoomStartScale = self.canvas.getZoom();
          }
          // Calculate delta from start scale
          var delta = zoomStartScale * event.self.scale;
          // Zoom to pinch point
          self.canvas.setZoom(delta);
        }
      })
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!