sortNode method
Implementation
void sortNode(Graph graph, List<GraphNode> list) {
Map<GraphNode, num> sortMap;
if (sort != null) {
sortMap = sort!.call(graph, list);
} else {
sortMap = _defaultSort(graph, list);
}
list.sort((a, b) {
num av = sortMap[a] ?? 0;
num bv = sortMap[b] ?? 0;
return bv.compareTo(av);
});
}