{"_id":"@bardit/cytoscape-expand-collapse","_rev":"2-c0a5fb8ed59b3366f30750a18b4b1e63","name":"@bardit/cytoscape-expand-collapse","description":"This extension provides an interface to expand-collapse nodes.","dist-tags":{"latest":"2.0.3"},"versions":{"2.0.3":{"name":"@bardit/cytoscape-expand-collapse","version":"2.0.3","description":"This extension provides an interface to expand-collapse nodes.","main":"cytoscape-expand-collapse.js","spm":{"main":"cytoscape-expand-collapse.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/bardit/cytoscape.js-expand-collapse.git"},"keywords":["cytoscape","cyext"],"license":"MIT","devDependencies":{"browserify":"^11.2.0","gulp":"^3.9.0","gulp-derequire":"^2.1.0","gulp-jshint":"^1.11.2","gulp-prompt":"^0.1.2","gulp-replace":"^0.5.4","gulp-shell":"^0.5.0","gulp-util":"^3.0.6","jshint-stylish":"^2.0.1","node-notifier":"^4.3.1","run-sequence":"^1.1.4","vinyl-buffer":"^1.0.0","vinyl-source-stream":"^1.1.0"},"peerDependencies":{"cytoscape":"^2.7.0","jquery":"^1.7.0 || ^2.0.0 || ^3.0.0"},"gitHead":"9c1ae05ec613b9715703911f71eb4c707718bb31","bugs":{"url":"https://github.com/bardit/cytoscape.js-expand-collapse/issues"},"homepage":"https://github.com/bardit/cytoscape.js-expand-collapse#readme","_id":"@bardit/cytoscape-expand-collapse@2.0.3","_shasum":"46f75b0b45fa79918fb425eae42065c2871f52b9","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"bardit","email":"bardit4040@gmail.com"},"dist":{"shasum":"46f75b0b45fa79918fb425eae42065c2871f52b9","tarball":"https://registry.npmjs.org/@bardit/cytoscape-expand-collapse/-/cytoscape-expand-collapse-2.0.3.tgz","integrity":"sha512-EKjRCQicsviCwIhrf+eX8+u2x/FpXZtug6IxtHaNeAczAkE7z25YYeIJQ/xGPwL1XQPRqPgkMh/lErxLrBkX5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB897e9qI4AbbI7ArjixOVzsfa+nGHDvKY+bOApwSF4QIhAPi2vxnI8ttb1PEtIdg2RDqh0pUpjMRn3Q7fh8kWNHNm"}]},"maintainers":[{"name":"bardit","email":"bardit4040@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cytoscape-expand-collapse-2.0.3.tgz_1497422299477_0.6465976701583713"}}},"readme":"cytoscape-expand-collapse\r\n================================================================================\r\nThis is a fork from cytoscape.js-expand-collapse with some bug fixes.\r\n## Description\r\n\r\nThis extension provides an interface to expand/collapse nodes for better management of complexity of Cytoscape.js compound graphs, distributed under [The MIT License](https://opensource.org/licenses/MIT). When using this extension, please cite the following paper, on which the ideas are based on:\r\n\r\nU. Dogrusoz and B. Genc, \"A Multi-Graph Approach to Complexity Management in Interactive Graph Visualization\", Computers & Graphics, 30(1), pp. 86-97, 2006.\r\n\r\n## API\r\n\r\n* Note that compounds are nodes.\r\n\r\n`cy.expandCollapse(options)`\r\nTo initialize/set options whenever you want.\r\n\r\n* Following functions get options parameter to apply during a particular event unlike the function above.\r\n\r\n`eles.collapse(options)`\r\nCollapse node(s).\r\n\r\n`eles.collapseRecursively(options)`\r\nCollapse node(s) and their child nodes.\r\n\r\n`cy.collapseAll(options)`\r\nCollapse all nodes on graph (recursively).\r\n\r\n`eles.expand(options)`\r\nExpand node(s).\r\n\r\n`eles.expandRecursively(options)`\r\nExpand node(s) and their child compounds.\r\n\r\n`cy.expandAll(options)`\r\nExpand all nodes on graph (recursively).\r\n\r\n`ele.isExpandable()`\r\nGet whether node is expandable (or is collapsed)\r\n\r\n`ele.isCollapsible()`\r\nGet whether node is expandable (or is collapsed).\r\n\r\n`eles.expandableNodes()`\r\nReturns expandable nodes from given set of elements.\r\n\r\n`eles.collapsibleNodes()`\r\nReturns collapsible nodes from given set of elements.\r\n\r\n`cy.expandableNodes()`\r\nReturns expandable nodes from whole graph.\r\n\r\n`cy.collapsibleNodes()`\r\nReturns collapsible nodes from whole graph.\r\n\r\n`cy.setExpandCollapseOptions(options)`\r\nResets the options to the given parameter.\r\n\r\n`cy.setExpandCollapseOption(name, value)`\r\nSets the value of the option given by the name to the given value.\r\n\r\n\r\n## Events\r\n`cy.nodes().on(\"beforeCollapse\", function(event) { var node = this; ... })` Triggered before a node is collapsed\r\n\r\n`cy.nodes().on(\"afterCollapse\", function(event) { var node = this; ... })` Triggered after a node is collapsed\r\n\r\n`cy.nodes().on(\"beforeExpand\", function(event) { var node = this; ... })` Triggered before a node is expanded\r\n\r\n`cy.nodes().on(\"afterExpand\", function(event) { var node = this; ... })`  Triggered after a node is expanded\r\n\r\n\r\n## Default Options\r\n```javascript\r\n    var options = {\r\n      layoutBy: null, // for rearrange after expand/collapse. It's just layout options or whole layout function. Choose your side!\r\n      fisheye: true, // whether to perform fisheye view after expand/collapse you can specify a function too\r\n      animate: true, // whether to animate on drawing changes you can specify a function too\r\n      ready: function () { }, // callback when expand/collapse initialized\r\n      undoable: true, // and if undoRedoExtension exists,\r\n\r\n      cueEnabled: true, // Whether cues are enabled\r\n      expandCollapseCuePosition: 'top-left', // default cue position is top left you can specify a function per node too\r\n      expandCollapseCueSize: 12, // size of expand-collapse cue\r\n      expandCollapseCueLineSize: 8, // size of lines used for drawing plus-minus icons\r\n      expandCueImage: undefined, // image of expand icon if undefined draw regular expand cue\r\n      collapseCueImage: undefined, // image of collapse icon if undefined draw regular collapse cue\r\n      expandCollapseCueSensitivity: 1 // sensitivity of expand-collapse cues\r\n    };\r\n```\r\n\r\n## Default Undo/Redo Actions\r\n`ur.do(\"collapse\", { nodes: eles, options: opts)` Equivalent of eles.collapse(opts)\r\n\r\n`ur.do(\"expand\", { nodes: eles, options: opts)` Equivalent of eles.expand(opts)\r\n\r\n`ur.do(\"collapseRecursively\", { nodes: eles, options: opts)` Equivalent of eles.collapseRecursively(opts)\r\n\r\n`ur.do(\"expandRecursively\", { nodes: eles, options: opts)` Equivalent of eles.expandRecursively(opts)\r\n\r\n`ur.do(\"collapseAll\", { options: opts)` Equivalent of cy.collapseAll(opts)\r\n\r\n`ur.do(\"expandAll\", { options: opts })` Equivalent of cy.expandAll(opts)\r\n\r\n## Elements Style\r\n\r\n * Collapsed nodes have 'cy-expand-collapse-collapsed-node' class.\r\n * Meta edges have 'cy-expand-collapse-meta-edge' class.\r\n\r\n## Dependencies\r\n\r\n * Cytoscape.js ^1.7.0\r\n * jQuery ^1.7.0 || ^2.0.0 || ^3.0.0\r\n * cytoscape-undo-redo.js(optional) ^1.0.1\r\n * cytoscape-cose-bilkent.js(optional/suggested for layout after expand/collapse) ^1.3.6\r\n\r\n\r\n## Usage instructions\r\n\r\nDownload the library:\r\n * via npm: `npm install cytoscape-expand-collapse`,\r\n * via bower: `bower install cytoscape-expand-collapse`, or\r\n * via direct download in the repository (probably from a tag).\r\n\r\n`require()` the library as appropriate for your project:\r\n\r\nCommonJS:\r\n```js\r\nvar cytoscape = require('cytoscape');\r\nvar jquery = require('jquery');\r\nvar expandCollapse = require('cytoscape-expand-collapse');\r\n\r\nexpandCollapse( cytoscape, jquery ); // register extension\r\n```\r\n\r\nAMD:\r\n```js\r\nrequire(['cytoscape', 'cytoscape-expand-collapse'], function( cytoscape, expand-collapse ){\r\n  expand-collapse( cytoscape ); // register extension\r\n});\r\n```\r\n\r\nPlain HTML/JS has the extension registered for you automatically, because no `require()` is needed.\r\n\r\n\r\n## Publishing instructions\r\n\r\nThis project is set up to automatically be published to npm and bower.  To publish:\r\n\r\n1. Set the version number environment variable: `export VERSION=1.2.3`\r\n1. Publish: `gulp publish`\r\n1. If publishing to bower for the first time, you'll need to run `bower register cytoscape-expand-collapse https://github.com/iVis-at-Bilkent/cytoscape.js-expand-collapse.git`\r\n\r\n\r\n## Team\r\n\r\n  * [Selim Firat Yilmaz](https://github.com/mrsfy), [Metin Can Siper](https://github.com/metincansiper), [Alper Karacelik](https://github.com/alperkaracelik), [Ugur Dogrusoz](https://github.com/ugurdogrusoz) of [i-Vis at Bilkent University](http://www.cs.bilkent.edu.tr/~ivis)\r\n","maintainers":[{"name":"bardit","email":"bardit4040@gmail.com"}],"time":{"modified":"2022-06-12T15:02:37.412Z","created":"2017-06-14T06:38:20.616Z","2.0.3":"2017-06-14T06:38:20.616Z"},"homepage":"https://github.com/bardit/cytoscape.js-expand-collapse#readme","keywords":["cytoscape","cyext"],"repository":{"type":"git","url":"git+https://github.com/bardit/cytoscape.js-expand-collapse.git"},"bugs":{"url":"https://github.com/bardit/cytoscape.js-expand-collapse/issues"},"license":"MIT","readmeFilename":"README.md"}