rufuspollock-okfn / bubbletree

Radial Bubble Tree Visualization
http://okfnlabs.org/bubbletree
152 stars 69 forks source link

config.maxNodesPerLevel apply only at root bubble #20

Open dmarzo opened 12 years ago

dmarzo commented 12 years ago

Fix (apply recursively)

me.preprocessData = function(root) {

    var me = this, maxNodes = me.config.maxNodesPerLevel;
    if (maxNodes) {
        if (maxNodes < root.children.length) {
            ....
        }

        for (index in root.children) {
            var child = root.children[index];
            me.preprocessData(child);
        }
    }
};