Skip to main content

Home > @jsplumbtoolkit/browser-ui > TemplateRenderer

TemplateRenderer interface

Defines a template renderer


export interface TemplateRenderer<E> 


asynchronousbooleanWhether or not vertices are rendered asynchronously, or in the current event loop. The vanilla renderer and certain other library integrations such as Angular and Vue2 or not asynchronous. But Vue3 and React 18 are.
reactivebooleanWhether or not the Surface can expect the renderer to detect data model changes that require a refresh of a given vertex's DOM representation. For vanilla and Svelte this is false; all the other library integrations set this to true.


addTemplate(id, content)?(Optional)
cleanupPort(objId, el)
cleanupVertex(objId, el)
render(templateId, data, dataSource, objectType, renderer, def, obj, node, eventInfo)
update(el, data, v, renderer)