cytoscape-edge-bend-editing
Advanced tools
Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "cytoscape-edge-bend-editing", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "A Cytoscape.js extension enables editing edge bend points", | ||
@@ -5,0 +5,0 @@ "main": "cytoscape-edge-bend-editing.js", |
@@ -77,5 +77,10 @@ cytoscape-edge-bend-editing | ||
```js | ||
cy.contextMenus('get'); | ||
cy.edgeBendEditing('get'); // Returns undefined if the extension is not initialized yet | ||
``` | ||
Or you can check if the extension is initilized before | ||
```js | ||
cy.edgeBendEditing('initialized'); | ||
``` | ||
## Default Options | ||
@@ -82,0 +87,0 @@ ```js |
@@ -31,2 +31,3 @@ ;(function(){ 'use strict'; | ||
var options; | ||
var initilized = false; | ||
@@ -51,5 +52,10 @@ // Merge default options with the ones coming from parameter | ||
if( opts === 'initilized' ) { | ||
return initilized; | ||
} | ||
if( opts !== 'get' ) { | ||
// merge the options with default ones | ||
options = extend(defaults, opts); | ||
initilized = true; | ||
@@ -79,3 +85,3 @@ // define edgebendediting-hasbendpoints css class | ||
var instance = { | ||
var instance = initilized ? { | ||
/* | ||
@@ -93,3 +99,3 @@ * get segment points of the given edge in an array A, | ||
} | ||
}; | ||
} : undefined; | ||
@@ -96,0 +102,0 @@ return instance; // chainability |
Sorry, the diff of this file is too big to display
185489
2930
119