Articles in this section

How to Render Only Icons in the Context Menu in Angular Diagram?

In this article, you can learn about how to render only icons in the context menu in Angular Diagram.To render only icons in the context menu, you can enhance the visual cues by associating icons with the iconCss property of the Angular Diagram. If you want to adjust the width of the context menu to fit the icons properly, you can override the default styles using the .e-contextmenu-wrapper ul and .e-contextmenu-container ul CSS class names. This will help you control the menu’s layout and ensure that only icons are displayed without text.

The below code snippet demonstrates how to render only icons in the context menu:

//Define custom menu items
   public contextMenuSettings: ContextMenuSettingsModel = {
       show: true, items: [
           {
               id: 'Clone', target: '.e-diagramcontent', iconCss: 'e-icons e-copy'
           },
           {
                id: 'Cut', target: '.e-diagramcontent', iconCss: 'e-icons e-cut'
           },
           {
               id: 'Paste', target: '.e-diagramcontent', iconCss: 'e-icons e-paste'
           },
           ],
       showCustomMenuOnly: true,
   }; 
.e-contextmenu-wrapper ul,
.e-contextmenu-container ul {
 min-width: 60px;
} 

Sample

Conclusion

I hope you enjoyed learning how to render only icons in the context menu in Angular Diagram.

I hope you learned about how to set the current zoom value to a specific value in Angular Diagram. You can refer to our Angular Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications.

You can also explore our Angular 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 explore 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!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied