How to Expand the Palette using External Button in JavaScript Diagram?
This article explains how to expand the palette using an external button in JavaScript Diagram. In our Syncfusion® JavaScript Diagram, symbol palettes can be expanded or collapsed by clicking the palette header. To control this behavior using an external button, update the expanded property of the palettes to true or false when the button is clicked.
<button id="collapseFlow">Collapse Flowshapses</button>
<button id="expandFlow">Expand Flowshapses</button>
document.getElementById('collapseFlow').onclick = function () {
palette.palettes[0].expanded = false;
palette.dataBind();
};
document.getElementById('expandFlow').onclick = function () {
palette.palettes[0].expanded = true;
palette.dataBind();
};
Refer to the working sample for additional details and implementation: Click here
Conclusion
We hope you enjoyed learning about how to expand the palette using an external button in JavaScript Diagram.
You can refer to our JavaScript Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Diagram example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!