cytoscape-edge-bend-editing
Advanced tools
Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "cytoscape-edge-bend-editing", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A Cytoscape.js extension enables editing edge bend points", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-edge-bend-editing.js", |
@@ -192,6 +192,14 @@ var bendPointUtilities = { | ||
var d1 = this.calculateDistance(srcPoint, tgtPoint); | ||
var d2 = this.calculateDistance(srcPoint, intersectionPoint); | ||
var weight = d2 / d1; | ||
var weight; | ||
if( intersectX != srcPoint.x ) { | ||
weight = (intersectX - srcPoint.x) / (tgtPoint.x - srcPoint.x); | ||
} | ||
else if( intersectY != srcPoint.y ) { | ||
weight = (intersectY - srcPoint.y) / (tgtPoint.y - srcPoint.y); | ||
} | ||
else { | ||
weight = 0; | ||
} | ||
var distance = Math.sqrt(Math.pow((intersectY - bendPoint.y), 2) | ||
@@ -198,0 +206,0 @@ + Math.pow((intersectX - bendPoint.x), 2)); |
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
186605
2960