-
-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Hi, I want to create a modal that can open from menuItems(cytoscape-context-menu). Here is my codes
` {
id: 'modal',
content: 'modal', // Display content of menu item
tooltipText: 'modal', // Tooltip text for menu item
//image: {src : "remove.svg", width : 12, height : 12, x : 6, y : 4}, // menu icon
// Filters the elements to have this menu item on cxttap
// If the selector is not truthy no elements will have this menu item on cxttap
selector: 'node, edge',
onClickFunction: function (event) {// The function to be executed on click
//let target = event.target
console.log('modal element');
console.log(event.cy.nodes())
const openModal = () => {
this.$refs['my-modal'].show()
document.getElementById("myModal").style.visibility = visible
}
},
disabled: false, // Whether the item will be created as disabled
show: true, // Whether the item will be shown or not
hasTrailingDivider: true, // Whether the item will have a trailing divider
coreAsWell: false, // Whether core instance have this item on cxttap
submenu: [] // Shows the listed menuItems as a submenu for this item. An item must have either submenu or onClickFunction or both.
},`
It did not work. Is there something I missed?