Javascript library to create 2D CAD project

  cad, draw, javascript

I’m looking for a javascript library to create a 2D CAD project like this one.

enter image description here

Additional features:

  • working area with a grid
  • drag&drop some elements (with magnet snap to grid or other restrictions), drag&drop working on tablet too
  • gradient fillings (for semicircles)

Could you suggest me a good library (free or not)?

Source: Ask Javascript Questions