switched from Raphael.js to Fabric.js. Support of rectangles and polygons. Needs to be tested