How to draw a sketch in the screen with javascript or html5 and correct all the desviations in lines?

i’m currently using paper.js for an app to draw concept sketches of forniture desing. Drawing on the screen with a pencil makes lines not straight.

Is there any component that can “guess” that you are drawing a straight line and correct it?