mma-server/src/main/resources/com/aliyun/odps/mma/server/ui/static/dag-viz.js
/*
 * Helper function to pre-process the graph layout.
 * This step is necessary for certain styles that affect the positioning
 * and sizes of graph elements, e.g. padding, font style, shape.
 */
Helper function to pre-process the graph layout.
This step is necessary for certain styles that affect the positioning
and sizes of graph elements, e.g. padding, font style, shape.
Helper function to pre - process the graph layout . This step is necessary for certain styles that affect the positioning and sizes of graph elements e . g . padding font style shape .
function preprocessGraphLayout(g) {
  var nodes = g.nodes();
  for (var i = 0; i < nodes.length; i++) {
    var isCluster = g.children(nodes[i]).length > 0;
    if (!isCluster) {
      var node = g.node(nodes[i]);
      node.labelStyle = "font-size: 12px";
      node.padding = "5";
    }
  }
  var edges = g.edges();
  for (var j = 0; j < edges.length; j++) {
    var edge = g.edge(edges[j]);
    edge.lineInterpolate = "basis";
  }
  g.graph().rankSep = TaskPageVizConstants.rankSep;
}
function preprocessGraphLayout ( g ) { var nodes = g . nodes ( ) ; for ( var i = 0 ; i < nodes . length ; i ++ ) { var isCluster = g . children ( nodes [ i ] ) . length > 0 ; if ( ! isCluster ) { var node = g . node ( nodes [ i ] ) ; node . labelStyle = "font-size: 12px" ; node . padding = "5" ; } } var edges = g . edges ( ) ; for ( var j = 0 ; j < edges . length ; j ++ ) { var edge = g . edge ( edges [ j ] ) ; edge . lineInterpolate = "basis" ; } g . graph ( ) . rankSep = TaskPageVizConstants . rankSep ; }
Helper function to pre-process the graph layout.
Helper function to pre - process the graph layout .
// Curve the edges // Adjust vertical separation between nodes