A rectangle with a label.
Supportedattrs
properties
Selector | Node | Description |
---|---|---|
root | SVGGElement | Container of all nodes |
body | SVGRectElement | Rectangular body of the shape |
label | SVGTextElement | Text inside the body |
var rectangle = new joint.shapes.standard.Rectangle();
rectangle.resize(100, 100);
rectangle.position(50, 10);
rectangle.attr('root/title', 'joint.shapes.standard.Rectangle');
rectangle.attr('label/text', 'Rectangle');
rectangle.attr('body/fill', 'lightblue');
rectangle.addTo(graph);