title: How to create a responsive canvas with absolute coordinates?
body: <p>I'm using the <a href="https://github.com/JoelBesada/scrollpath" rel="nofollow">Scrollpath plugin</a> to build a weird navigation in a website. It basically lets you draw a path using a canvas element and the scroll movement follows the path.</p>
  
  <p>I would like to make it responsive, now, but I have really no idea where to start from.</p>
  
  <p>To define the path you use directive in the form of <code>lineTo(200, 1000)</code>, which draws a line from the current or previous position to the one defined in the parameters.</p>
  
  <p>The problem, I think, is that a point can be outside of the current viewport. So, how can I calculate its correct new position once I shrink the window?</p>