src/chart/tree/layoutHelper.js
function executeShifts(node) {
    var children = node.children;
    var n = children.length;
    var shift = 0;
    var change = 0;
    while (--n >= 0) {
        var child = children[n];
        child.hierNode.prelim += shift;
        child.hierNode.modifier += shift;
        change += child.hierNode.change;
        shift += child.hierNode.shift + change;
    }
}
function executeShifts(node) {
    var children = node.children;
    var n = children.length;
    var shift = 0;
    var change = 0;
    while (--n >= 0) {
        var child = children[n];
        child.hierNode.prelim += shift;
        child.hierNode.modifier += shift;
        change += child.hierNode.change;
        shift += child.hierNode.shift + change;
    }
}
function executeShifts ( node ) { var children = node . children ; var n = children . length ; var shift = 0 ; var change = 0 ; while ( -- n >= 0 ) { var child = children [ n ] ; child . hierNode . prelim += shift ; child . hierNode . modifier += shift ; change += child . hierNode . change ; shift += child . hierNode . shift + change ; } }
All other shifts, applied to the smaller subtrees between w- and w+, are
performed by this function.

The implementation of this function was originally copied from "d3.js"
<https://github.com/d3/d3-hierarchy/blob/4c1f038f2725d6eae2e49b61d01456400694bac4/src/tree.js>
with some modifications made for this program.
See the license statement at the head of this file.

@param  {module:echarts/data/Tree~TreeNode} node
All other shifts applied to the smaller subtrees between w - and w + are performed by this function .