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;} Copy
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;}
Static
Adds the given StencilShape.
Returns the StencilShape for the given name.
Optional
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: