Class StencilShapeRegistry

A singleton class that provides a registry for stencils and the methods for painting those stencils onto a canvas or into a DOM.

Code to add stencils:

const response = load('test/stencils.xml');
const root = response.getDocumentElement();
let shape = root.firstChild;

while (shape) {
if (shape.nodeType === mxConstants.NODETYPE_ELEMENT) {
StencilShapeRegistry.addStencil(shape.getAttribute('name'), new mxStencil(shape));
}

shape = shape.nextSibling;
}

Constructors

Properties

Methods

Constructors

Properties

stencils: Stencils = {}

Methods