Using RappidJS how can I dynamically add new elements to a rendered stencil

460 Views Asked by At

I'm using the kitchen sink demo (https://resources.jointjs.com/demos/kitchensink)

And looking at the docs

https://resources.jointjs.com/docs/rappid/v2.4/ui.html#ui.Stencil

What I can't understand is how can I can take the already rendered stencil as part of the demo add a new element to it dynamically?

I'm thinking something like

var stencil = joint.ui.stencil(App.config.stencil);
1

There are 1 best solutions below

0
Steoates On BEST ANSWER

Inside of stencil-service.ts add a new item in the object that is returned by getStencilShapes