How to use cytoscape-edgehandles - 1 common examples

To help you get started, we’ve selected a few cytoscape-edgehandles 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 { $ }  from 'meteor/jquery'
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-edgehandles

Edge creation UI extension for Cytoscape

MIT
Latest version published 3 years ago

Package Health Score

46 / 100
Full package analysis

Popular cytoscape-edgehandles functions