Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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