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:

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

Constructors

Properties

Methods

Constructors

Properties

stencils: Stencils = {}

Methods