cytoscape-edge-bend-editing
Advanced tools
Comparing version 1.4.3 to 1.4.4
{ | ||
"name": "cytoscape-edge-bend-editing", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "A Cytoscape.js extension enables editing edge bend points", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-edge-bend-editing.js", |
@@ -38,3 +38,3 @@ var debounce = require('./debounce'); | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
}; | ||
@@ -57,3 +57,3 @@ | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
}; | ||
@@ -115,3 +115,3 @@ | ||
if(cy){ | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
} | ||
@@ -161,3 +161,5 @@ }, 0); | ||
function clearDraws(renderSelectedBendShapes) { | ||
// Clear node draws and render bend shapes for all selected edges if param is true, | ||
// if param is a node render bend shapes for selected connected edges of that node | ||
function clearDraws(param) { | ||
@@ -169,7 +171,7 @@ var w = $container.width(); | ||
if( renderSelectedBendShapes ) { | ||
var selectedEdges = cy.edges(':selected'); | ||
for( var i = 0; i < selectedEdges.length; i++ ) { | ||
var edge = selectedEdges[i]; | ||
if( param ) { | ||
var edges = param.isNode && param.isNode() ? param.connectedEdges(':selected') : cy.edges(':selected'); | ||
for( var i = 0; i < edges.length; i++ ) { | ||
var edge = edges[i]; | ||
renderBendShapes(edge); | ||
@@ -287,3 +289,2 @@ } | ||
$container.cytoscape(function (e) { | ||
clearDraws(true); | ||
@@ -295,3 +296,3 @@ lastPanningEnabled = cy.panningEnabled(); | ||
cy.bind('zoom pan', eZoom = function () { | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
}); | ||
@@ -301,4 +302,3 @@ | ||
var node = this; | ||
clearDraws(true); | ||
clearDraws(node); // clear draws and render bend shapes for selected connected edges of this node | ||
}); | ||
@@ -309,3 +309,3 @@ | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
}); | ||
@@ -322,3 +322,3 @@ | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
}); | ||
@@ -380,3 +380,3 @@ | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
}); | ||
@@ -468,3 +468,3 @@ | ||
resetGestures(); | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
}); | ||
@@ -495,3 +495,3 @@ | ||
edge.select(); | ||
clearDraws(true); | ||
clearDraws(true); // clear draws and render bend shapes for the selected edges | ||
@@ -498,0 +498,0 @@ }); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
188107
2936