Hi!
I would like to know how can I create multiple panels in my plugin? I’ve set the manifest up correctly but I can’t figure out how can I present this in the main.js.
I couldn’t find any resources about having multiple panels or from the API to find the uiEntryPoint that the user has gone through.
manifest.js
...
"uiEntryPoints": [
{
"type": "panel",
"panelId": "panel1",
"label": "Panel1"
},
{
"type": "panel",
"panelId": "panel2",
"label": "Panel2"
},
{
"type": "panel",
"panelId": "panel3",
"label": "Panel3"
},
{
"type": "panel",
"panelId": "panel4",
"label": "Panel4"
}
]
main.js
function show(event) {
const content = `VERY LONG FORM`;
const panel = document.createElement("div");
panel.innerHTML = content;
event.node.appendChild(panel);
}
function hide(event) {
event.node.firstChild.remove();
}
function update(selection) {
...
}
module.exports = {
panels: {
panel1: {
show
},
panel2: {
show
},
panel3: {
show
},
panel4: {
show,
update,
hide
}
}
};
Thank you.