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

138
Views
Change size of HTML5 canvas drawings but maintain canvas dimensions

Here is the scenario:

  • Suppose the dimensions of the canvas element is set to a max height and max width and obviously does not occupy the entire screen
  • We can make drawings made in the canvas larger on events:
   function onMouseMove(e)
   { 
      e.preventDefault();
      if (pinching) {
         resizeDrawings();
      }  
   }
   function resizeDrawings();
   {
     //stuff happens
     const context = currentCanvas.current.getContext('2d');
     //canvas operations

   }

Basically, i want the canvas to overflow and become scrollable if its own contents become too big to fit on it's own dimensions.

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!