Issue
I'm trying to use the :not selector in cytoscape.js. I want to select all nodes that don't have a specific attribute to open an context menu. E.g.:
cy.cxtmenu({
selector: not('node.selection'),
commands: [ .... ]
});
But I'm not sure how I can do this in cytoscape.js. Any help will be welcome.
Solution
[^name] Matches elements if the specified data attribute is not defined, i.e. undefined (e.g [^foo]). Here, null is considered a defined value.
http://js.cytoscape.org/#selectors/data
Answered By - maxkfranz Answer Checked By - Senaida (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.