How to use cytoscape-cxtmenu - 1 common examples

To help you get started, we’ve selected a few cytoscape-cxtmenu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github topogram / topogram / imports / ui / components / network / networkMethods.js View on Github external
import cytoscape  from 'cytoscape'

// cytoscape extensions
import edgehandles from 'cytoscape-edgehandles'
import cxtmenu from 'cytoscape-cxtmenu'
import spread from "cytoscape-spread"

import * as _ from 'lodash'

import { Nodes, Edges } from '../../../api/collections.js'
import { makeNode } from '../../../api/modelsHelpers.js'
import { colors } from '../../helpers/colors.js'

// register extensions
edgehandles( cytoscape, $ )
cxtmenu( cytoscape, $ ) // register extension

// register layouts
// TODO: currently Cola requires  a build from Grunt...
// import cycola from "cytoscape-cola"
// import cola from 'webcola'
// cycola(cytoscape, webcola)
spread(cytoscape)

/*
*
* @param domElement DOM the dom element where the graph will be created
* @param nodes Array array of Nodes
* @param edges Array array of Edges
* @param options Object a set of options
* @param readOnlyMode booelan toggle edit mode
*/

cytoscape-cxtmenu

A circular, swipeable context menu extension for Cytoscape.js

MIT
Latest version published 2 years ago

Package Health Score

57 / 100
Full package analysis

Popular cytoscape-cxtmenu functions