{"_id":"klayjs","_rev":"318918","name":"klayjs","description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","dist-tags":{"latest":"0.4.1"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"time":{"modified":"2021-06-03T20:11:33.000Z","created":"2014-10-08T09:12:00.680Z","0.4.1":"2016-04-13T10:17:08.678Z","0.4.0":"2016-01-06T11:38:38.682Z","0.3.2":"2015-03-26T23:11:06.163Z","0.3.1":"2015-03-19T09:57:47.206Z","0.3.0":"2015-01-28T15:49:32.219Z","0.2.1":"2014-10-08T09:15:38.852Z","0.2.0":"2014-10-08T09:12:00.680Z"},"users":{},"author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"versions":{"0.4.1":{"name":"klayjs","version":"0.4.1","author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","main":"klay.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"keywords":["graph","layout","layered","ports","dataflow"],"devDependencies":{"grunt":"~0.4.2","grunt-zip":"~0.13.0","grunt-curl":"~1.4.0","grunt-contrib-clean":"~0.5.0","grunt-rename":"~0.1.3","grunt-file-append":"~0.0.6"},"license":"EPL-1.0","gitHead":"51be6fbc3c3d69014c253bf879daad5c2d4a5557","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"homepage":"https://github.com/OpenKieler/klayjs","_id":"klayjs@0.4.1","_shasum":"5bf9fadc7a3e44b94082bba501e7d803076dcfc2","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"uruuru","email":"uru@informatik.uni-kiel.de"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"dist":{"shasum":"5bf9fadc7a3e44b94082bba501e7d803076dcfc2","size":164832,"noattachment":false,"key":"/klayjs/-/klayjs-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/klayjs/download/klayjs-0.4.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/klayjs-0.4.1.tgz_1460542626400_0.9384729242883623"},"directories":{},"publish_time":1460542628678,"_cnpm_publish_time":1460542628678,"_hasShrinkwrap":false},"0.4.0":{"name":"klayjs","version":"0.4.0","author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","main":"klay.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"keywords":["graph","layout","layered","ports","dataflow"],"devDependencies":{"grunt":"~0.4.2","grunt-zip":"~0.13.0","grunt-curl":"~1.4.0","grunt-contrib-clean":"~0.5.0","grunt-rename":"~0.1.3","grunt-file-append":"~0.0.6"},"license":"EPL-1.0","gitHead":"72ded9952166589678a9a08c3fe156471b90f119","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"homepage":"https://github.com/OpenKieler/klayjs","_id":"klayjs@0.4.0","_shasum":"4f83416cd0825fa8dec2741c927c1bb2c583a588","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"uruuru","email":"uru@informatik.uni-kiel.de"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"dist":{"shasum":"4f83416cd0825fa8dec2741c927c1bb2c583a588","size":161155,"noattachment":false,"key":"/klayjs/-/klayjs-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/klayjs/download/klayjs-0.4.0.tgz"},"directories":{},"publish_time":1452080318682,"_cnpm_publish_time":1452080318682,"_hasShrinkwrap":false},"0.3.2":{"name":"klayjs","version":"0.3.2","author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","main":"klay.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"keywords":["graph","layout","layered","ports","dataflow"],"devDependencies":{"grunt":"~0.4.2","grunt-zip":"~0.13.0","grunt-curl":"~1.4.0","grunt-contrib-clean":"~0.5.0","grunt-rename":"~0.1.3","grunt-file-append":"~0.0.6"},"license":"EPL-1.0","gitHead":"a3183ad5719b2fc4fc406e7a4d4fb969b8745ac3","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"homepage":"https://github.com/OpenKieler/klayjs","_id":"klayjs@0.3.2","_shasum":"a92551f210697606239a71bab35b83ecbd7e450c","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"uruuru","email":"uru@informatik.uni-kiel.de"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"dist":{"shasum":"a92551f210697606239a71bab35b83ecbd7e450c","size":116408,"noattachment":false,"key":"/klayjs/-/klayjs-0.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/klayjs/download/klayjs-0.3.2.tgz"},"directories":{},"publish_time":1427411466163,"_cnpm_publish_time":1427411466163,"_hasShrinkwrap":false},"0.3.1":{"name":"klayjs","version":"0.3.1","author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","main":"klay.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"keywords":["graph","layout","layered","ports","dataflow"],"devDependencies":{"grunt":"~0.4.2","grunt-zip":"~0.13.0","grunt-curl":"~1.4.0","grunt-contrib-clean":"~0.5.0","grunt-rename":"~0.1.3","grunt-file-append":"~0.0.6"},"license":"EPL-1.0","gitHead":"5b7128b83b7eb5b4ae38aff9a66e479fb421cb30","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"homepage":"https://github.com/OpenKieler/klayjs","_id":"klayjs@0.3.1","_shasum":"8e8827e8ac08256063914fcd2fcc956c7d296f1c","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"uruuru","email":"uru@informatik.uni-kiel.de"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"dist":{"shasum":"8e8827e8ac08256063914fcd2fcc956c7d296f1c","size":115595,"noattachment":false,"key":"/klayjs/-/klayjs-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/klayjs/download/klayjs-0.3.1.tgz"},"directories":{},"publish_time":1426759067206,"_cnpm_publish_time":1426759067206,"_hasShrinkwrap":false},"0.3.0":{"name":"klayjs","version":"0.3.0","author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","main":"klay.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"keywords":["graph","layout","layered","ports","dataflow"],"devDependencies":{"grunt":"~0.4.2","grunt-zip":"~0.13.0","grunt-curl":"~1.4.0","grunt-contrib-clean":"~0.5.0","grunt-rename":"~0.1.3","grunt-file-append":"~0.0.6"},"license":"EPL-1.0","gitHead":"68ab992b817d6229fc29b3886e1a29677feab4a2","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"homepage":"https://github.com/OpenKieler/klayjs","_id":"klayjs@0.3.0","_shasum":"1b7ccb80a871f2ac81bf06593ce0fe68bf667965","_from":"./","_npmVersion":"1.4.21","_npmUser":{"name":"uruuru","email":"uru@informatik.uni-kiel.de"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"dist":{"shasum":"1b7ccb80a871f2ac81bf06593ce0fe68bf667965","size":115514,"noattachment":false,"key":"/klayjs/-/klayjs-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/klayjs/download/klayjs-0.3.0.tgz"},"directories":{},"publish_time":1422460172219,"_cnpm_publish_time":1422460172219,"_hasShrinkwrap":false},"0.2.1":{"name":"klayjs","version":"0.2.1","author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","main":"klay.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"keywords":["graph","layout","layered","ports","dataflow"],"devDependencies":{"grunt":"~0.4.2","grunt-zip":"~0.13.0","grunt-curl":"~1.4.0","grunt-contrib-clean":"~0.5.0","grunt-rename":"~0.1.3"},"license":"EPL-1.0","gitHead":"95ea12902c076ccb4f08db6a3247d77d6c6724b0","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"homepage":"https://github.com/OpenKieler/klayjs","_id":"klayjs@0.2.1","_shasum":"acb0ef0a607c0bceab02e8501a42b75b31506720","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"uruuru","email":"uru@informatik.uni-kiel.de"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"dist":{"shasum":"acb0ef0a607c0bceab02e8501a42b75b31506720","size":104802,"noattachment":false,"key":"/klayjs/-/klayjs-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/klayjs/download/klayjs-0.2.1.tgz"},"directories":{},"publish_time":1412759738852,"_cnpm_publish_time":1412759738852,"_hasShrinkwrap":false},"0.2.0":{"name":"klayjs","version":"0.2.0","author":{"name":"Ulf Rueegg","email":"uru@informatik.uni-kiel.de"},"description":"Automatic graph layout based on Sugiyama's algorithm. Specialized for data flow diagrams and ports.","main":"klay.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/OpenKieler/klayjs.git"},"keywords":["graph","layout","layered","ports","dataflow"],"devDependencies":{"grunt":"~0.4.2","grunt-zip":"~0.13.0","grunt-curl":"~1.4.0","grunt-contrib-clean":"~0.5.0","grunt-rename":"~0.1.3"},"license":"EPL v1.0","gitHead":"e08e7a5b473551de823cb14e439856ba906f0d8b","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"homepage":"https://github.com/OpenKieler/klayjs","_id":"klayjs@0.2.0","_shasum":"a6c8d117c6e7c785a3e86198149cda9c6f43960c","_from":"./","_npmVersion":"1.4.21","_npmUser":{"name":"uruuru","email":"uru@informatik.uni-kiel.de"},"maintainers":[{"name":"uruuru","email":"uru@informatik.uni-kiel.de"}],"dist":{"shasum":"a6c8d117c6e7c785a3e86198149cda9c6f43960c","size":104803,"noattachment":false,"key":"/klayjs/-/klayjs-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/klayjs/download/klayjs-0.2.0.tgz"},"directories":{},"publish_time":1412759520680,"_cnpm_publish_time":1412759520680,"_hasShrinkwrap":false}},"readme":"KLayJS\n===\n\nKLayJS is a layer-based layout algorithm that is particularly suited for\nnode-link diagrams with an inherent direction and ports \n(explicit attachment points on a node's border). It is based on the \nideas originally introduced by Sugiyama et al. \n\nThe algorithm is developed in Java and compiled to JavaScript using GWT. \nFor further information see the KIELER [Wiki pages][wiki-klay]. \n\nIn case you want to use the layout in conjunction with [D3.js][d3js] \nyou can take a look at our [KLayJS-D3][klayjs-d3] extension.\ngru\n\nExample Layout of a Ptolemy Diagram\n===\n![Ptolemy Diagram](http://rtsys.informatik.uni-kiel.de/~uru/ptolemy.png)\n\nInstallation\n===\nEither download the `klay.js` file or install it using `npm` or `bower`.\n```bash\nnpm install klayjs\n```\n```bash\nbower install klayjs\n```\n\nUsage\n===\nThe library can be used in the browser, in a WebWorker, and with server-side node.js. \n\nInput graph\n---\nWe use the [JSON KGraph][jsonkgraph] format to specify a graph with its properties. \nA minimal example looks like this:\n```js\nvar graph = {\n  \"id\": \"root\",\n  \"properties\": {\n      \"direction\": \"RIGHT\", \"spacing\": 40\n  },\n  \"children\": [{\"id\": \"n1\", \"width\": 40, \"height\": 40}, \n               {\"id\": \"n2\", \"width\": 40, \"height\": 40}],\n  \"edges\": [{\"id\": \"e1\", \"source\": \"n1\", \"target\": \"n2\"}]\n};\n```\n\nBrowser\n---\nWithin the browser KLayJS is registered globally with the `$klay` variable \nand can be used as follows. Note the difference between _local_ layout options\nspecified for specific elements in the graph and _global_ layout options \nthat are applied to every graph element.\n```html\n<script type=\"text/javascript\" src=\"klayjs.js\"></script>\n<script>\n$klay.layout({\n  graph: graph,\n  options: { spacing: 20 },\n  success: function(layouted) { console.log(layouted); },\n  error: function(error) { console.log(error); }\n});\n</script>\n```\n\nWeb Worker\n---\nDepending on the graph size the layout process can take \nsome time possibly freezing your browser (though it should be fast \nin most cases). Modern browsers support _web workers_, some kind of\nthreads for the browser. The following code snippet demonstrates\nhow to start and communicate with a web worker performing layout.\n\n```js\nvar worker = new Worker('klayjs.js');\n// send layout request\nworker.postMessage({\n  graph: [graph],\n  options: [options]\n});\n// \nworker.addEventListener('message', function (e) {\n  var graph = e.data;\n  // [ applyLayout(graph) ]\n}, false);\n```\n\nnode.js\n---\nFor rapid prototyping or headless diagram generation\nno browser is required and you might want to use node.js. \n\n```bash\nnpm install klayjs\n```\n\n```js\nvar klay = require('klayjs');\nklay.layout({\n  graph: [graph],\n  options: [options],\n  success: function(g) { console.log(g); }\n});\n```\n\nLayout Options\n---\nA broad variety of layout options is supported. The available options \nand their effects are discussed [here][wiki-layopts]\n\n### Differences\n- Other than for the original java version of the layouter, \n  the `layoutHierarchy` option is by default `true`.\n- If you intend to use the fixed layouter (`de.cau.cs.kieler.fixed`) at some point, you\n  have to set `layoutHierarchy` to `false`.\n\nExamples \n===\n\nSome examples using the [KLayJS-D3][klayjs-d3] extension are available at:\n- [Ports](http://openkieler.github.io/klayjs-d3/examples/ports/)\n- [Hierarchy](http://openkieler.github.io/klayjs-d3/examples/hierarchy/)\n- [Interactive](http://openkieler.github.io/klayjs-d3/examples/interactive/)\n- [Miserables](http://openkieler.github.io/klayjs-d3/examples/miserables/) (Data From D3 Force Example)\n\nSee the `examples` folder of the klayjs-d3 project.\n\n#### SCChart with Dataflow\n![SCChart with Dataflow](http://rtsys.informatik.uni-kiel.de/~uru/scchartsdataflow.png)\n\n#### Sequentially Constructive Graph\n![Sequentially Constructive Graph](http://rtsys.informatik.uni-kiel.de/~uru/scg.png)\n\n[wiki-klay]: http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/KLay+Layered\n[wiki-layopts]: http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/KLay+Layered+Layout+Options\n[jsonkgraph]: http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/JSON+Graph+Format\n[klayjs-d3]: https://github.com/OpenKieler/klayjs-d3\n[d3js]: http://d3js.org/","_attachments":{},"homepage":"https://github.com/OpenKieler/klayjs","bugs":{"url":"https://github.com/OpenKieler/klayjs/issues"},"license":"EPL-1.0"}