Showing 623 of 1,229 total issues
Function step
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function step() {
var p = (sigma.utils.dateNow() - start) / duration;
if (p >= 1) {
s.graph.nodes().forEach(function(node) {
Function getBoundaries
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.utils.getBoundaries = function(graph, prefix, doEdges) {
var i,
l,
e = graph.edges(),
n = graph.nodes(),
Function d3_scale_quantize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_scale_quantize(x0, x1, range) {
var kx, i;
function scale(x) {
return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
}
Function parseParams
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseParams(req, parseCb) {
var rule
, ruleFn
, normalParam;
Function html
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
html: function( value ) {
return jQuery.access( this, function( value ) {
var elem = this[0] || {},
i = 0,
l = this.length;
Function addClass
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addClass: function( value ) {
var classes, elem, cur, clazz, j,
i = 0,
len = this.length,
proceed = typeof value === "string" && value;
Function removeClass
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
removeClass: function( value ) {
var classes, elem, cur, clazz, j,
i = 0,
len = this.length,
proceed = arguments.length === 0 || typeof value === "string" && value;
Function placeholder
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function placeholder(name, next) {
return b.functionExpression(b.identifier(name), [
b.identifier("req"),
b.identifier("res")
],
Function buildAttraction
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildAttraction: function(logAttr, distributedAttr, adjustBySize, c) {
if (adjustBySize) {
if (logAttr) {
if (distributedAttr) {
return new this.logAttraction_degreeDistributed_antiCollision(c);
Function def
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.canvas.edges.def = function(edge, source, target, context, settings) {
var color = edge.color,
prefix = settings('prefix') || '',
edgeColor = settings('edgeColor'),
defaultNodeColor = settings('defaultNodeColor'),
Function floatColor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
sigma.utils.floatColor = function(val) {
var result = [0, 0, 0];
if (val.match(/^#/)) {
val = (val || '').replace(/^#/, '');
Function placeholder
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function placeholder(name, next) {
return b.functionExpression(b.identifier(name), [
b.identifier("req"),
b.identifier("res")
],
Function d3_selection_on
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_selection_on(type, listener, capture) {
var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
if (i > 0) type = type.substring(0, i);
var filter = d3_selection_onFilters.get(type);
if (filter) type = filter, wrap = d3_selection_onFilter;
Function position
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function position(row, u, rect, flush) {
var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
if (u == rect.dx) {
if (flush || v > rect.dy) v = rect.dy;
while (++i < n) {
Function diagonal
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.svg.diagonal = function() {
var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
function diagonal(d, i) {
var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
x: p0.x,
Function apportion
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function apportion(v, w, ancestor) {
if (w) {
var vip = v, vop = v, vim = w, vom = vip.parent.children[0], sip = vip.m, sop = vop.m, sim = vim.m, som = vom.m, shift;
while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
vom = d3_layout_treeLeft(vom);
Function attr
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3_transitionPrototype.attr = function(nameNS, value) {
if (arguments.length < 2) {
for (value in nameNS) this.attr(value, nameNS[value]);
return this;
}
Function d3_geom_voronoiCloseCells
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geom_voronoiCloseCells(extent) {
var x0 = extent[0][0], x1 = extent[1][0], y0 = extent[0][1], y1 = extent[1][1], x2, y2, x3, y3, cells = d3_geom_voronoiCells, iCell = cells.length, cell, iHalfEdge, halfEdges, nHalfEdges, start, end;
while (iCell--) {
cell = cells[iCell];
if (!cell || !cell.prepare()) continue;
Function d3_geo_centroidRingStart
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geo_centroidRingStart() {
var λ00, φ00, x0, y0, z0;
d3_geo_centroid.point = function(λ, φ) {
λ00 = λ, φ00 = φ;
d3_geo_centroid.point = nextPoint;
Function fix
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
fix: function( event ) {
if ( event[ jQuery.expando ] ) {
return event;
}