index.js
function (insertPath, level) {

        var node = insertPath[level],
            M = node.children.length,
            m = this._minEntries;

        this._chooseSplitAxis(node, m, M);

        var splitIndex = this._chooseSplitIndex(node, m, M);

        var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));
        newNode.height = node.height;
        newNode.leaf = node.leaf;

        calcBBox(node, this.toBBox);
        calcBBox(newNode, this.toBBox);

        if (level) insertPath[level - 1].children.push(newNode);
        else this._splitRoot(node, newNode);
    }
function (insertPath, level) {

        var node = insertPath[level],
            M = node.children.length,
            m = this._minEntries;

        this._chooseSplitAxis(node, m, M);

        var splitIndex = this._chooseSplitIndex(node, m, M);

        var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));
        newNode.height = node.height;
        newNode.leaf = node.leaf;

        calcBBox(node, this.toBBox);
        calcBBox(newNode, this.toBBox);

        if (level) insertPath[level - 1].children.push(newNode);
        else this._splitRoot(node, newNode);
    }
function ( insertPath , level ) { var node = insertPath [ level ] , M = node . children . length , m = this . _minEntries ; this . _chooseSplitAxis ( node , m , M ) ; var splitIndex = this . _chooseSplitIndex ( node , m , M ) ; var newNode = createNode ( node . children . splice ( splitIndex , node . children . length - splitIndex ) ) ; newNode . height = node . height ; newNode . leaf = node . leaf ; calcBBox ( node , this . toBBox ) ; calcBBox ( newNode , this . toBBox ) ; if ( level ) insertPath [ level - 1 ] . children . push ( newNode ) ; else this . _splitRoot ( node , newNode ) ; }
split overflowed node into two
split overflowed node into two