Adds a panel. render is a built-in panel name (string) or a function that returns an HTMLElement or a string; the function is called once, when the panel is first shown. Open the panel with openElements([dataElement]).
render
openElements([dataElement])
{ dataElement, location, render }.
{ dataElement, location, render }
instance.UI.addPanel({ dataElement: 'infoPanel', location: 'right', render: () => { const div = document.createElement('div'); div.textContent = 'Custom panel content'; return div; },});instance.UI.openElements(['infoPanel']); Copy
instance.UI.addPanel({ dataElement: 'infoPanel', location: 'right', render: () => { const div = document.createElement('div'); div.textContent = 'Custom panel content'; return div; },});instance.UI.openElements(['infoPanel']);
Adds a panel.
renderis a built-in panel name (string) or a function that returns an HTMLElement or a string; the function is called once, when the panel is first shown. Open the panel withopenElements([dataElement]).