08-27-周三_17-09-29

This commit is contained in:
2025-08-27 17:10:05 +08:00
commit 86df397d8f
12735 changed files with 1145479 additions and 0 deletions

35
node_modules/dagre-layout/lib/debug.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
import _ from 'lodash'
import { Graph } from 'graphlibrary'
import util from './util'
/* istanbul ignore next */
function debugOrdering (g) {
const layerMatrix = util.buildLayerMatrix(g)
const h = new Graph({ compound: true, multigraph: true }).setGraph({})
_.forEach(g.nodes(), function (v) {
h.setNode(v, { label: v })
h.setParent(v, 'layer' + g.node(v).rank)
})
_.forEach(g.edges(), function (e) {
h.setEdge(e.v, e.w, {}, e.name)
})
_.forEach(layerMatrix, function (layer, i) {
const layerV = 'layer' + i
h.setNode(layerV, { rank: 'same' })
_.reduce(layer, function (u, v) {
h.setEdge(u, v, { style: 'invis' })
return v
})
})
return h
}
export default {
debugOrdering
}