Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cytoscape

Package Overview
Dependencies
Maintainers
1
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape - npm Package Compare versions

Comparing version 2.2.5 to 2.2.6

build/cytoscape.js-2.2.6.zip

2

bower.json
{
"name": "cytoscape",
"version": "2.2.5",
"version": "2.2.6",
"main": "dist/cytoscape.js",

@@ -5,0 +5,0 @@ "ignore": [

@@ -109,3 +109,3 @@ require(['cytoscape'], function(rjsCy){

edges: [
{ data: { id: 'ae', weight: 1, source: 'a', target: 'e' } },
{ data: { id: 'a"e', weight: 1, source: 'a', target: 'e' } },
{ data: { id: 'ab', weight: 3, source: 'a', target: 'b' } },

@@ -112,0 +112,0 @@ { data: { id: 'be', weight: 4, source: 'b', target: 'e' } },

@@ -16,3 +16,3 @@ ## Notes & caveats

// get node j and the edges coming out from it
cy.elements("node#j, edge[source = 'j']");
cy.elements('node#j, edge[source = "j"]');
```

@@ -23,8 +23,14 @@

```js
//cy.filter("node[name = Jerry]"); // this doesn't work
cy.filter("node[name = 'Jerry']"); // but this does
//cy.filter('node[name = Jerry]'); // this doesn't work
cy.filter('node[name = "Jerry"]'); // but this does
```
Note that metacharacters need to be escaped:
```js
cy.filter('#some\\$funky\\@id');
```
## Group, class, & ID

@@ -31,0 +37,0 @@

{
"name": "cytoscape",
"description": "A JavaScript graph library for analysis and visualisation",
"version": "2.2.5",
"version": "2.2.6",
"license": "LGPL",

@@ -6,0 +6,0 @@ "engines": {

@@ -48,6 +48,6 @@ ;(function($$){ 'use strict';

var vwEdges = v.connectedEdges(directed ? '[source = "' + v.id() + '"]' : undefined).intersect( edges );
var vwEdges = v.connectedEdges(directed ? function(){ return this.data('source') === v.id(); } : undefined).intersect( edges );
for( var i = 0; i < vwEdges.length; i++ ){
var e = vwEdges[i];
var w = e.connectedNodes('[id != "' + v.id() + '"]').intersect( nodes );
var w = e.connectedNodes(function(){ return this.id() !== v.id() }).intersect( nodes );

@@ -121,7 +121,7 @@ if( w.length !== 0 && !V[ w.id() ] ){

var vwEdges = v.connectedEdges(directed ? '[source = "' + v.id() + '"]' : undefined).intersect( edges );
var vwEdges = v.connectedEdges(directed ? function(){ return this.data('source') === v.id(); } : undefined).intersect( edges );
for( var i = 0; i < vwEdges.length; i++ ){
var e = vwEdges[i];
var w = e.connectedNodes('[id != "' + v.id() + '"]').intersect( nodes );
var w = e.connectedNodes(function(){ return this.id() !== v.id(); }).intersect( nodes );

@@ -225,3 +225,3 @@ if( w.length !== 0 && !discovered[ w.id() ] ){

var edges = this.edges().not(':loop');
var edges = this.edges().filter(function(){ return !this.isLoop(); });
var nodes = this.nodes();

@@ -228,0 +228,0 @@ var Q = [];

@@ -14,3 +14,5 @@ ;(function($$){ 'use strict';

var hasEdgesPointingIn = ele.connectedEdges('[target = "' + ele.id() + '"][source != "' + ele.id() + '"]').length > 0;
var hasEdgesPointingIn = ele.connectedEdges(function(){
this.data('target') === ele.id() && this.data('source') !== ele.id()
}).length > 0;

@@ -17,0 +19,0 @@ if( !hasEdgesPointingIn ){

@@ -194,3 +194,2 @@ ;(function($$){ 'use strict';

var grabHandler = function(e){
grabbed = this;
var pos = sys.fromScreen( this.position() );

@@ -204,9 +203,9 @@ var p = arbor.Point(pos.x, pos.y);

break;
case 'dragstop':
case 'free':
this.scratch().arbor.fixed = false;
this.scratch().arbor.tempMass = 1000
//this.scratch().arbor.tempMass = 1000;
break;
}
};
nodes.bind('grab drag dragstop', grabHandler);
nodes.bind('grab drag free', grabHandler);

@@ -287,3 +286,3 @@ nodes.each(function(i, node){

// unbind handlers
nodes.unbind('grab drag dragstop', grabHandler);
nodes.unbind('grab drag free', grabHandler);

@@ -301,5 +300,7 @@ // enable back grabbing if so set

sys.start();
setTimeout(function(){
sys.stop();
}, options.maxSimulationTime);
if( options.maxSimulationTime != null && options.maxSimulationTime > 0 && options.maxSimulationTime !== Infinity ){
setTimeout(function(){
sys.stop();
}, options.maxSimulationTime);
}

@@ -306,0 +307,0 @@ };

@@ -52,3 +52,5 @@ ;(function($$){ 'use strict';

var maxDegree = nodes.maxDegree( false );
roots = nodes.filter('[[degree = ' + maxDegree + ']]');
roots = nodes.filter(function(){
return this.degree() === maxDegree;
});
}

@@ -156,3 +158,5 @@ }

var intersectsDepth = function( node ){ // returns true if has edges pointing in from a higher depth
var edges = node.connectedEdges('[target = "' + node.id() + '"]');
var edges = node.connectedEdges(function(){
return this.data('target') === node.id()
});
var thisInfo = node._private.scratch.BreadthFirstLayout;

@@ -166,3 +170,3 @@ var highestDepthOfOther = 0;

if( thisInfo.depth < otherInfo.depth && highestDepthOfOther < otherInfo.depth ){
if( thisInfo.depth <= otherInfo.depth && highestDepthOfOther < otherInfo.depth ){
highestDepthOfOther = otherInfo.depth;

@@ -169,0 +173,0 @@ highestOther = otherNode;

@@ -89,4 +89,3 @@ ;(function($$){ 'use strict';

var tokens = {
metaChar: '[\\!\\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]', // chars we need to escape in var names, etc
variable: '(?:[\\w-]|(?:\\\\"+ metaChar +"))+', // a variable name
metaChar: '[\\!\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]', // chars we need to escape in var names, etc
comparatorOp: '=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=', // binary comparison op (used in data selectors)

@@ -102,2 +101,3 @@ boolOp: '\\?|\\!|\\^', // boolean (unary) operators (used in data selectors)

};
tokens.variable = '(?:[\\w-]|(?:\\\\'+ tokens.metaChar +'))+'; // a variable name
tokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number

@@ -104,0 +104,0 @@ tokens.className = tokens.variable; // a class name (follows variable conventions)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc