Showing 231 of 371 total issues
Function step
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
step: function( gotoEnd ) {
var p, n, complete,
t = fxNow || createFxNow(),
done = true,
elem = this.elem,
Consider simplifying this complex logical expression. Open
Open
if ( ( mappedTypes || origType === handleObj.origType ) &&
( !handler || handler.guid === handleObj.guid ) &&
( !namespaces || namespaces.test( handleObj.namespace ) ) &&
( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
eventType.splice( j--, 1 );
Consider simplifying this complex logical expression. Open
Open
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
first.charAt(0) === "<" && !rnocache.test( first ) &&
(jQuery.support.checkClone || !rchecked.test( first )) &&
(jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
Function d3_scale_linear
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_scale_linear(domain, range, interpolate, clamp) {
function rescale() {
var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
output = linear(domain, range, uninterpolate, interpolate);
input = linear(range, domain, uninterpolate, d3.interpolate);
Function chord
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.svg.chord = function() {
function chord(d, i) {
var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
}
Function interpolateTransform
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.interpolateTransform = function(a, b) {
var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
if (ta[0] != tb[0] || ta[1] != tb[1]) {
s.push("translate(", null, ",", null, ")");
q.push({
Function CHILD
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
CHILD: function( elem, match ) {
var first, last,
doneName, parent, cache,
count, diff,
type = match[1],
Function d3_scale_log
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_scale_log(linear, log) {
function scale(x) {
return linear(log(x));
}
var pow = log.pow;
Function bonne
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geo.bonne = function() {
function bonne(coordinates) {
var x = coordinates[0] * d3_geo_radians - x0, y = coordinates[1] * d3_geo_radians - y0;
if (y1) {
var p = c1 + y1 - y, E = x * Math.cos(y) / p;
Function ajaxHandleResponses
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ajaxHandleResponses( s, jqXHR, responses ) {
var contents = s.contents,
dataTypes = s.dataTypes,
responseFields = s.responseFields,
Function domManip
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
domManip: function( args, table, callback ) {
var results, first, fragment, parent,
value = args[0],
scripts = [];
Function d3_time_interval
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_time_interval(local, step, number) {
function round(date) {
var d0 = local(date), d1 = offset(d0, 1);
return date - d0 < d1 - date ? d0 : d1;
}
Function mousedown
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function mousedown() {
function point() {
var p = target.parentNode;
return touchId ? d3.touches(p).filter(function(p) {
return p.identifier === touchId;
Function pie
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.pie = function() {
function pie(data, i) {
var values = data.map(function(d, i) {
return +value.call(pie, d, i);
});
Function stop
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
stop: function( type, clearQueue, gotoEnd ) {
if ( typeof type !== "string" ) {
gotoEnd = clearQueue;
clearQueue = type;
type = undefined;
Function parseRows
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dsv.parseRows = function(text, f) {
function token() {
if (reParse.lastIndex >= text.length) return EOF;
if (eol) {
eol = false;
Function polygon
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geom.polygon = function(coordinates) {
coordinates.area = function() {
var i = 0, n = coordinates.length, a = coordinates[n - 1][0] * coordinates[0][1], b = coordinates[n - 1][1] * coordinates[0][0];
while (++i < n) {
a += coordinates[i - 1][0] * coordinates[i][1];
Function load
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
load: function( url, params, callback ) {
if ( typeof url !== "string" && _load ) {
return _load.apply( this, arguments );
// Don't do a request if no elements are being requested
Function histogram
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.histogram = function() {
function histogram(data, i) {
var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
while (++i < m) {
bin = bins[i] = [];
Function show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, show: function () {
var $tip
, inside
, pos
, actualWidth