All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.selection.order.js Maven / Gradle / Ivy

import "selection";

d3_selectionPrototype.order = function() {
  for (var j = -1, m = this.length; ++j < m;) {
    for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
      if (node = group[i]) {
        if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
        next = node;
      }
    }
  }
  return this;
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy