Skip to main content

EmbeddedImage

An image embedded into a rectangle with a label.

SVG selectors

Supported attrs properties:

SelectorNodeDescription
rootSVGGElementContainer of all nodes
bodySVGRectElementRectangular body of the shape
imageSVGImageElementImage inside the body
labelSVGTextElementText next to the body
const embeddedImage = new shapes.standard.EmbeddedImage();
embeddedImage.resize(150, 100);
embeddedImage.position(425, 410);
embeddedImage.attr('root/title', 'shapes.standard.EmbeddedImage');
embeddedImage.attr('label/text', 'Embedded\nImage');
embeddedImage.attr('image/xlinkHref', 'image.png');

Stay in the know

Be where thousands of diagramming enthusiasts meet

Star us on GitHub