cytoscape-elk
Advanced tools
Comparing version 2.0.2 to 2.1.0
@@ -10,3 +10,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
root["cytoscapeElk"] = factory(root["ELK"]); | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE__434__) { | ||
})(this, function(__WEBPACK_EXTERNAL_MODULE__245__) { | ||
return /******/ (function() { // webpackBootstrap | ||
@@ -16,6 +16,6 @@ /******/ "use strict"; | ||
/***/ 434: | ||
/***/ 245: | ||
/***/ (function(module) { | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__434__; | ||
module.exports = __WEBPACK_EXTERNAL_MODULE__245__; | ||
@@ -32,4 +32,5 @@ /***/ }) | ||
/******/ // Check if module is in cache | ||
/******/ if(__webpack_module_cache__[moduleId]) { | ||
/******/ return __webpack_module_cache__[moduleId].exports; | ||
/******/ var cachedModule = __webpack_module_cache__[moduleId]; | ||
/******/ if (cachedModule !== undefined) { | ||
/******/ return cachedModule.exports; | ||
/******/ } | ||
@@ -91,3 +92,3 @@ /******/ // Create a new module (and put it into the cache) | ||
// EXTERNAL MODULE: external {"commonjs":"elkjs","commonjs2":"elkjs","amd":"elkjs","root":"ELK"} | ||
var external_commonjs_elkjs_commonjs2_elkjs_amd_elkjs_root_ELK_ = __webpack_require__(434); | ||
var external_commonjs_elkjs_commonjs2_elkjs_amd_elkjs_root_ELK_ = __webpack_require__(245); | ||
var external_commonjs_elkjs_commonjs2_elkjs_amd_elkjs_root_ELK_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_elkjs_commonjs2_elkjs_amd_elkjs_root_ELK_); | ||
@@ -137,4 +138,6 @@ ;// CONCATENATED MODULE: ./src/assign.js | ||
elk: { | ||
// Options to pass directly to ELK `layoutOptions` | ||
// the elk algorithm to use | ||
// Options to pass directly to ELK `layoutOptions`. The subsequent identifier has to be used as property key in quotes. | ||
// E.g. for 'org.eclipse.elk.direction' use: | ||
// 'elk.direction' | ||
// Primary/mandatory, the elk algorithm to use | ||
// one of 'box', 'disco', 'force', 'layered', 'mrtree', 'radial', 'random', 'stress' | ||
@@ -155,3 +158,3 @@ // (see https://www.eclipse.org/elk/reference/algorithms.html) | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } | ||
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } | ||
@@ -302,5 +305,4 @@ | ||
var graph = makeGraph(nodes, edges, options); | ||
elk.layout(graph, { | ||
layoutOptions: options.elk | ||
}).then(function () { | ||
graph['layoutOptions'] = options.elk; | ||
elk.layout(graph).then(function () { | ||
nodes.filter(function (n) { | ||
@@ -350,3 +352,3 @@ return !n.isParent(); | ||
}(); | ||
__webpack_exports__ = __webpack_exports__.default; | ||
__webpack_exports__ = __webpack_exports__["default"]; | ||
/******/ return __webpack_exports__; | ||
@@ -353,0 +355,0 @@ /******/ })() |
{ | ||
"name": "cytoscape-elk", | ||
"version": "2.0.2", | ||
"version": "2.1.0", | ||
"description": "The ELK layout algorithm adapter for Cytoscape.js", | ||
@@ -47,3 +47,3 @@ "main": "dist/cytoscape-elk.js", | ||
"dependencies": { | ||
"elkjs": "^0.7.0" | ||
"elkjs": "^0.8.1" | ||
}, | ||
@@ -50,0 +50,0 @@ "prettier": { |
@@ -70,9 +70,14 @@ cytoscape-elk | ||
// All options are available at http://www.eclipse.org/elk/reference.html | ||
// 'org.eclipse.elk.' can be dropped from the Identifier | ||
// Or look at demo-demo.js for an example. | ||
// Enums use the name of the enum e.g. | ||
// 'searchOrder': 'DFS' | ||
// | ||
// The main field to set is `algorithm`, which controls which particular | ||
// layout algorithm is used. | ||
// 'org.eclipse.' can be dropped from the identifier. The subsequent identifier has to be used as property key in quotes. | ||
// E.g. for 'org.eclipse.elk.direction' use: | ||
// 'elk.direction' | ||
// | ||
// Enums use the name of the enum as string e.g. instead of Direction.DOWN use: | ||
// 'elk.direction': 'DOWN' | ||
// | ||
// The main field to set is `algorithm`, which controls which particular layout algorithm is used. | ||
// Example (downwards layered layout): | ||
'algorithm': 'layered', | ||
'elk.direction': 'DOWN', | ||
}, | ||
@@ -79,0 +84,0 @@ priority: function( edge ){ return null; }, // Edges with a non-nil value are skipped when geedy edge cycle breaking is enabled |
@@ -17,4 +17,6 @@ const defaults = { | ||
elk: { | ||
// Options to pass directly to ELK `layoutOptions` | ||
// the elk algorithm to use | ||
// Options to pass directly to ELK `layoutOptions`. The subsequent identifier has to be used as property key in quotes. | ||
// E.g. for 'org.eclipse.elk.direction' use: | ||
// 'elk.direction' | ||
// Primary/mandatory, the elk algorithm to use | ||
// one of 'box', 'disco', 'force', 'layered', 'mrtree', 'radial', 'random', 'stress' | ||
@@ -21,0 +23,0 @@ // (see https://www.eclipse.org/elk/reference/algorithms.html) |
@@ -163,7 +163,5 @@ import ELK from 'elkjs/lib/elk.bundled.js'; | ||
const graph = makeGraph(nodes, edges, options); | ||
graph['layoutOptions'] = options.elk | ||
elk | ||
.layout(graph, { | ||
layoutOptions: options.elk, | ||
}) | ||
.layout(graph) | ||
.then(() => { | ||
@@ -170,0 +168,0 @@ nodes |
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
345618
6712
121
+ Addedelkjs@0.8.2(transitive)
- Removedelkjs@0.7.1(transitive)
Updatedelkjs@^0.8.1