JSFiddle - React, Tailwind, and code Playground
by demee
HTML
<div id="canvas"></div>
CSS
#canvas {
width: 400px;
height: 400px;
border: 1px solid black;
}
JavaScript
Raphael.fn.square = function(x, y, w){
var path = ['M', x, y, 'L', x + w, y, 'L', x + w, y + w, 'L', x, y + w, 'Z'];
return this.path(path);
};
var paper = Raphael('canvas');
paper.square(10, 10, 100);