js ejdiagram custom contextMenu
I am working on contextmenu for ejdiagram. but not work Matching to Bellow Link:
http://help.syncfusion.com/js/api/ejdiagram#members:contextmenu
Thanks
Hi Hamid,
We have created a JSplayground to achieve your requirement. Please refer to the below JSplayground link and the code example. We have not refreshed our documentation online. We will refresh it with our volume 3 service pack 1 release, which is scheduled to be released by the end of October, 2015.
JSPlayground link: http://jsplayground.syncfusion.com/jdguesgq
Code example:
<script type="text/javascript">
$("#diagram").ejDiagram({
//enable the context menu in the diagram
enableContextMenu: true,
contextMenu: {
// define the custom context menu items.
items: [
{
// name of the context menu item
name: "zoom",
// Text to be displayed
text: "Zoom",
},
],
// hide the default context menu items.
showCustomMenuItemsOnly: true
},
contextMenuBeforeOpen: function (args) {
//do your custom action here.
},
contextMenuClick: function (args) {
//do your custom action here.
}
}
});
</script>
Regards,
Shyam G

- 8 Replies
- 3 Participants
-
HA hamidR
- Oct 26, 2015 11:30 AM UTC
- Mar 20, 2017 03:54 AM UTC