mirror of
https://github.com/ae-utbm/sith.git
synced 2024-12-23 16:21:22 +00:00
f624b7c66d
* Remove graphviz and use cytoscape.js instead * Frontend generated graphs * Make installation easier and faster * Better user experience * Family api and improved interface * Fix url history when using 0, improve button selection and reset reverse with reset button * Use klay layout * Add js translations and apply review comments
7 lines
6.7 KiB
JavaScript
7 lines
6.7 KiB
JavaScript
/**
|
|
* Minified by jsDelivr using Terser v5.3.0.
|
|
* Original file: /npm/cytoscape-klay@3.1.4/cytoscape-klay.js
|
|
*
|
|
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
|
*/
|
|
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("klayjs")):"function"==typeof define&&define.amd?define(["klayjs"],r):"object"==typeof exports?exports.cytoscapeKlay=r(require("klayjs")):e.cytoscapeKlay=r(e.$klay)}(this,(function(e){return function(e){var r={};function n(t){if(r[t])return r[t].exports;var i=r[t]={i:t,l:!1,exports:{}};return e[t].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=r,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=3)}([function(e,r,n){"use strict";var t=n(4),i=n(1),a=n(2),o={addUnnecessaryBendpoints:"de.cau.cs.kieler.klay.layered.unnecessaryBendpoints",alignment:"de.cau.cs.kieler.alignment",aspectRatio:"de.cau.cs.kieler.aspectRatio",borderSpacing:"borderSpacing",compactComponents:"de.cau.cs.kieler.klay.layered.components.compact",compactionStrategy:"de.cau.cs.kieler.klay.layered.nodeplace.compactionStrategy",contentAlignment:"de.cau.cs.kieler.klay.layered.contentAlignment",crossingMinimization:"de.cau.cs.kieler.klay.layered.crossMin",cycleBreaking:"de.cau.cs.kieler.klay.layered.cycleBreaking",debugMode:"de.cau.cs.kieler.debugMode",direction:"de.cau.cs.kieler.direction",edgeLabelSideSelection:"de.cau.cs.kieler.klay.layered.edgeLabelSideSelection",edgeRouting:"de.cau.cs.kieler.edgeRouting",edgeSpacingFactor:"de.cau.cs.kieler.klay.layered.edgeSpacingFactor",feedbackEdges:"de.cau.cs.kieler.klay.layered.feedBackEdges",fixedAlignment:"de.cau.cs.kieler.klay.layered.fixedAlignment",greedySwitchCrossingMinimization:"de.cau.cs.kieler.klay.layered.greedySwitch",hierarchyHandling:"de.cau.cs.kieler.hierarchyHandling",inLayerSpacingFactor:"de.cau.cs.kieler.klay.layered.inLayerSpacingFactor",interactiveReferencePoint:"de.cau.cs.kieler.klay.layered.interactiveReferencePoint",layerConstraint:"de.cau.cs.kieler.klay.layered.layerConstraint",layoutHierarchy:"de.cau.cs.kieler.layoutHierarchy",linearSegmentsDeflectionDampening:"de.cau.cs.kieler.klay.layered.linearSegmentsDeflectionDampening",mergeEdges:"de.cau.cs.kieler.klay.layered.mergeEdges",mergeHierarchyCrossingEdges:"de.cau.cs.kieler.klay.layered.mergeHierarchyEdges",noLayout:"de.cau.cs.kieler.noLayout",nodeLabelPlacement:"de.cau.cs.kieler.nodeLabelPlacement",nodeLayering:"de.cau.cs.kieler.klay.layered.nodeLayering",nodePlacement:"de.cau.cs.kieler.klay.layered.nodePlace",portAlignment:"de.cau.cs.kieler.portAlignment",portAlignmentEastern:"de.cau.cs.kieler.portAlignment.east",portAlignmentNorth:"de.cau.cs.kieler.portAlignment.north",portAlignmentSouth:"de.cau.cs.kieler.portAlignment.south",portAlignmentWest:"de.cau.cs.kieler.portAlignment.west",portConstraints:"de.cau.cs.kieler.portConstraints",portLabelPlacement:"de.cau.cs.kieler.portLabelPlacement",portOffset:"de.cau.cs.kieler.offset",portSide:"de.cau.cs.kieler.portSide",portSpacing:"de.cau.cs.kieler.portSpacing",postCompaction:"de.cau.cs.kieler.klay.layered.postCompaction",priority:"de.cau.cs.kieler.priority",randomizationSeed:"de.cau.cs.kieler.randomSeed",routeSelfLoopInside:"de.cau.cs.kieler.selfLoopInside",separateConnectedComponents:"de.cau.cs.kieler.separateConnComp",sizeConstraint:"de.cau.cs.kieler.sizeConstraint",sizeOptions:"de.cau.cs.kieler.sizeOptions",spacing:"de.cau.cs.kieler.spacing",splineSelfLoopPlacement:"de.cau.cs.kieler.klay.layered.splines.selfLoopPlacement",thoroughness:"de.cau.cs.kieler.klay.layered.thoroughness",wideNodesOnMultipleLayers:"de.cau.cs.kieler.klay.layered.wideNodesOnMultipleLayers"},c=function(e){for(var r=Object.keys(e),n={},t=0;t<r.length;t++){var i=r[t],a=o[i],c=e[i];n[a]=c}return n},s={interactiveReferencePoint:"CENTER"},l=function(e){for(var r=e.parent(),n=e.scratch("klay"),t={x:n.x,y:n.y};r.nonempty();){var i=r.scratch("klay");t.x+=i.x,t.y+=i.y,r=r.parent()}return t},d=function(e,r){var n=e.layoutDimensions(r),t=e.numericStyle("padding"),i={_cyEle:e,id:e.id(),padding:{top:t,left:t,bottom:t,right:t}};return e.isParent()||(i.width=n.w,i.height=n.h),e.scratch("klay",i),i},u=function(e,r){var n={_cyEle:e,id:e.id(),source:e.data("source"),target:e.data("target"),properties:{}},t=r.priority(e);return null!=t&&(n.properties.priority=t),e.scratch("klay",n),n};function p(e){var r=e.klay;this.options=i({},a,e),this.options.klay=i({},a.klay,r,s)}p.prototype.run=function(){var e=this.options,r=e.eles,n=r.nodes(),i=function(e,r,n){for(var t=[],i=[],a={},o={id:"root",children:[],edges:[]},c=0;c<e.length;c++){var s=e[c],l=d(s,n);t.push(l),a[s.id()]=l}for(var p=0;p<r.length;p++){var y=r[p],g=u(y,n);i.push(g),a[y.id()]=g}for(var k=0;k<t.length;k++){var f=t[k],m=f._cyEle;if(m.isChild()){var h=a[m.parent().id()];(h.children=h.children||[]).push(f)}else o.children.push(f)}for(var S=0;S<i.length;S++){var E=i[S],v=E._cyEle;v.source().parent(),v.target().parent(),o.edges.push(E)}return o}(n,r.edges(),e);return t.layout({graph:i,options:c(e.klay),success:function(){},error:function(e){throw e}}),n.filter((function(e){return!e.isParent()})).layoutPositions(this,e,l),this},p.prototype.stop=function(){return this},p.prototype.destroy=function(){return this},e.exports=p},function(e,r,n){"use strict";e.exports=null!=Object.assign?Object.assign.bind(Object):function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return n.filter((function(e){return null!=e})).forEach((function(r){Object.keys(r).forEach((function(n){return e[n]=r[n]}))})),e}},function(e,r,n){"use strict";var t={nodeDimensionsIncludeLabels:!1,fit:!0,padding:20,animate:!1,animateFilter:function(e,r){return!0},animationDuration:500,animationEasing:void 0,transform:function(e,r){return r},ready:void 0,stop:void 0,klay:{addUnnecessaryBendpoints:!1,aspectRatio:1.6,borderSpacing:20,compactComponents:!1,crossingMinimization:"LAYER_SWEEP",cycleBreaking:"GREEDY",direction:"UNDEFINED",edgeRouting:"ORTHOGONAL",edgeSpacingFactor:.5,feedbackEdges:!1,fixedAlignment:"NONE",inLayerSpacingFactor:1,layoutHierarchy:!1,linearSegmentsDeflectionDampening:.3,mergeEdges:!1,mergeHierarchyCrossingEdges:!0,nodeLayering:"NETWORK_SIMPLEX",nodePlacement:"BRANDES_KOEPF",randomizationSeed:1,routeSelfLoopInside:!1,separateConnectedComponents:!0,spacing:20,thoroughness:7},priority:function(e){return null}};e.exports=t},function(e,r,n){"use strict";var t=n(0),i=function(e){e&&e("layout","klay",t)};"undefined"!=typeof cytoscape&&i(cytoscape),e.exports=i},function(r,n){r.exports=e}])})); |