Showing 623 of 1,229 total issues
Function d3_rgb_parse
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_rgb_parse(format, rgb, hsl) {
var r = 0, g = 0, b = 0, m1, m2, color;
m1 = /([a-z]+)\((.*)\)/i.exec(format);
if (m1) {
m2 = m1[2].split(",");
Function event
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
zoom.event = function(g) {
g.each(function() {
var dispatch = event.of(this, arguments), view1 = view;
if (d3_transitionInheritId) {
d3.select(this).transition().each("start.zoom", function() {
Function d3_geom_voronoiAttachCircle
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_geom_voronoiAttachCircle(arc) {
var lArc = arc.P, rArc = arc.N;
if (!lArc || !rArc) return;
var lSite = lArc.site, cSite = arc.site, rSite = rArc.site;
if (lSite === rSite) return;
Function arc
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.svg.arc = function() {
var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
function arc() {
var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0,
a0 = a1, a1 = da), a1 - a0), df = da < π ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
Function processCSI
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
timbits.processCSI = function(index, element) {
var include = jQuery(element);
var src = include.attr('data-csi');
var process_this = true;
Function update
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
update: function(toUpdate) {
var def = Promise.defer();
var socket = this;
var id = toUpdate._id;
Function applyPlacement
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, applyPlacement: function(offset, placement){
var $tip = this.tip()
, width = $tip[0].offsetWidth
, height = $tip[0].offsetHeight
, actualWidth
Function load
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.load = function(path, callback) {
// Quick XHR polyfill:
var xhr = (function() {
if (window.XMLHttpRequest)
return new XMLHttpRequest();
Function register
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function register(name, fn) {
// flx.register(name, function capsule(msg) {
// // merge scope (this) and signature (msg._sign)
// (function reply(req, res) {
Function _quadSubdivide
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function _quadSubdivide(index, quad) {
var next = quad.level + 1,
subw = Math.round(quad.bounds.width / 2),
subh = Math.round(quad.bounds.height / 2),
qx = Math.round(quad.bounds.x),
Function resolution
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resolution(graphParts) {
var _contexts = {};
for (var i = 0; i < graphParts.length; i++) {
Function token
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function token() {
if (I >= N) return EOF;
if (eol) return eol = false, EOL;
var j = I;
if (text.charCodeAt(j) === 34) {
Function circle
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geo.circle = function() {
var origin = [ 0, 0 ], angle, precision = 6, interpolate;
function circle() {
var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];
interpolate(null, null, 1, {
Function brush
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function brush(g) {
g.each(function() {
var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
var background = g.selectAll(".background").data([ 0 ]);
background.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
Function d3_interpolateString
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_interpolateString(a, b) {
var bi = d3_interpolate_numberA.lastIndex = d3_interpolate_numberB.lastIndex = 0, am, bm, bs, i = -1, s = [], q = [];
a = a + "", b = b + "";
while ((am = d3_interpolate_numberA.exec(a)) && (bm = d3_interpolate_numberB.exec(b))) {
if ((bs = bm.index) > bi) {
Function promise
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.ready.promise = function( obj ) {
if ( !readyList ) {
readyList = jQuery.Deferred();
Function handlers
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handlers: function( event, handlers ) {
var sel, handleObj, matches, i,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
Function Overview
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Overview(express, redis, options) {
this.express = express;
this.redis = redis;
this.options = options;
this._formatByte = __bind(this._formatByte, this);
Function Overview
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Overview(express, redis, options) {
this.express = express;
this.redis = redis;
this.options = options;
this._formatByte = __bind(this._formatByte, this);
Function ensureValidToken
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ensureValidToken(userSession, cb) {
var then = new Date(userSession.createdAt);
var now = new Date();
var remaining = (now - then) / 1000; // Remaining until token expires.
remaining += 600; // Add 10 minutes