Articles in this section

How to Render Context Menu on Left Click in Vue Diagram?

This article explains how to render a context menu on left-click in Vue Diagram. In Syncfusion® Vue Diagram, native support for rendering a context menu on a left-click is not provided by default. However, this functionality can be achieved at the application level. To implement a context menu on left-click, certain steps need to be taken.

Firstly, within the context menu settings, menu items need to be defined. This involves specifying the content and actions associated with each menu item. The customization of item visibility and hiding can be controlled using the contextMenuOpen event. This event allows you to set conditions based on specific requirements.

In Syncfusion® Diagram, native support for rendering a context menu on a left click is not provided by default. However, this functionality can be implemented at the application level. To achieve this, you need to define the context menu items within the context menu settings. The visibility of these items can be customized using the contextMenuOpen event, where conditions based on your requirements can be specified.

To render the context menu on a left click, the click event of the diagram is utilized. This event is triggered when a click occurs on the diagram. Within this event, the instances of the context menu are obtained, and the button type is checked to ensure it is a left click. If the specified condition is met, the context menu is opened using the open method at the respective position of the selected node.

Refer to the working sample for additional details and implementation: Sample

Conclusion

We hope you enjoyed learning how to render a context menu on left click in Vue Diagram.

You can refer to our Vue 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 Vue 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!

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