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:
let req = mxUtils.load('test/stencils.xml');let root = req.getDocumentElement();let shape = root.firstChild;while (shape != null){ if (shape.nodeType === mxConstants.NODETYPE_ELEMENT) { mxStencilRegistry.addStencil(shape.getAttribute('name'), new mxStencil(shape)); } shape = shape.nextSibling;} Copy
let req = mxUtils.load('test/stencils.xml');let root = req.getDocumentElement();let shape = root.firstChild;while (shape != null){ if (shape.nodeType === mxConstants.NODETYPE_ELEMENT) { mxStencilRegistry.addStencil(shape.getAttribute('name'), new mxStencil(shape)); } shape = shape.nextSibling;}
StencilShapeRegistry
Static
Adds the given Stencil.
Returns the Stencil for the given name.
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:
StencilShapeRegistry