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

cytoscape-edge-bend-editing

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cytoscape-edge-bend-editing - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "cytoscape-edge-bend-editing",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Cytoscape.js extension enables editing edge bend points",

@@ -5,0 +5,0 @@ "main": "cytoscape-edge-bend-editing.js",

@@ -52,2 +52,5 @@ cytoscape-edge-bend-editing

`ele.getSegmentPoints()`
Returns the center coordinates of segment points.
## Default Options

@@ -77,1 +80,5 @@ ```js

1. If publishing to bower for the first time, you'll need to run `bower register cytoscape-edge-bend-editing https://github.com/iVis-at-Bilkent/cytoscape.js-edge-bend-editing.git`
## Team
* [Metin Can Siper](https://github.com/metincansiper), [Ugur Dogrusoz](https://github.com/ugurdogrusoz) of [i-Vis at Bilkent University](http://www.cs.bilkent.edu.tr/~ivis)

@@ -276,2 +276,4 @@ var bendPointUtilities = {

// var segPts = this.getSegmentPoints(edge);
var minDist = Infinity;

@@ -383,2 +385,9 @@ var intersection;

}
},
calculateDistance: function(pt1, pt2) {
var diffX = pt1.x - pt2.x;
var diffY = pt1.y - pt2.y;
var dist = Math.sqrt( Math.pow( diffX, 2 ) + Math.pow( diffY, 2 ) );
return dist;
}

@@ -385,0 +394,0 @@ };

@@ -65,2 +65,13 @@ ;(function($$, $){ 'use strict';

} );
/*
* get segment points of an edge in an array A,
* A[2 * i] is the x coordinate and A[2 * i + 1] is the y coordinate
* of the ith bend point.
*/
cytoscape( 'collection', 'getSegmentPoints', function(){
var ele = this;
return bendPointUtilities.getSegmentPoints(ele);
} );

@@ -67,0 +78,0 @@ };

@@ -244,3 +244,3 @@ var debounce = require('./debounce');

var segpts = edge._private.rscratch.segpts;
var segpts = bendPointUtilities.getSegmentPoints(edge);//edge._private.rscratch.segpts;
var length = getBendShapesLenght(edge);

@@ -384,2 +384,7 @@

var edge = this;
if(!edge.selected()) {
return;
}
var containerPos = $(cy.container()).position();

@@ -386,0 +391,0 @@

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

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