Showing 231 of 371 total issues
Function data
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: function( key, value ) {
var parts, attr, name,
data = null;
if ( typeof key === "undefined" ) {
Function show
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, show: function () {
var $tip
, inside
, pos
, actualWidth
Function d3_svg_line
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_svg_line(projection) {
function line(data) {
function segment() {
segments.push("M", interpolate(projection(points), tension));
}
Function extend
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone,
target = arguments[0] || {},
i = 1,
length = arguments.length,
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
Function val
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
val: function( value ) {
var hooks, ret, isFunction,
elem = this[0];
if ( !arguments.length ) {
Function when
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
when: function( firstParam ) {
var args = sliceDeferred.call( arguments, 0 ),
i = 0,
length = args.length,
pValues = new Array( length ),
Function extent
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
brush.extent = function(z) {
var x0, x1, y0, y1, t;
if (!arguments.length) {
z = extentDomain || extent;
if (x) {
Method person_by
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def person_by(person = nil, time_period = "month")
messages = []
unless person.nil?
Message.find(:sent_by_id => person.id).union(:sent_to_id => person.id).each {|message| messages << message}
else
Function albers
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geo.albers = function() {
function albers(coordinates) {
var t = n * (d3_geo_radians * coordinates[0] - lng0), p = Math.sqrt(C - 2 * n * Math.sin(d3_geo_radians * coordinates[1])) / n;
return [ scale * p * Math.sin(t) + translate[0], scale * (p * Math.cos(t) - p0) + translate[1] ];
}
Function voronoi
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geom.voronoi = function(vertices) {
var polygons = vertices.map(function() {
return [];
});
d3_voronoi_tessellate(vertices, function(e) {
Function getWH
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getWH( elem, name, extra ) {
// Start with offset property
var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
which = name === "width" ? cssWidth : cssHeight,
Function d3_time_scale
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function d3_time_scale(linear, methods, format) {
function scale(x) {
return linear(x);
}
scale.invert = function(x) {
Function partition
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.partition = function() {
function position(node, x, dx, dy) {
var children = node.children;
node.x = x;
node.y = node.depth * dy;
Function pack
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.layout.pack = function() {
function pack(d, i) {
var nodes = hierarchy.call(this, d, i), root = nodes[0];
root.x = 0;
root.y = 0;
Function slide
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, slide: function (type, next) {
var $active = this.$element.find('.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
Function d3_rgb_parse
has 34 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, name;
m1 = /([a-z]+)\((.*)\)/i.exec(format);
if (m1) {
m2 = m1[2].split(",");
Function attr
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attr: function( elem, name, value, pass ) {
var ret, hooks, notxml,
nType = elem.nodeType;
// don't get/set attributes on text, comment and attribute nodes
Function slide
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
, slide: function (type, next) {
var $active = this.$element.find('.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
Function azimuthal
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
d3.geo.azimuthal = function() {
function azimuthal(coordinates) {
var x1 = coordinates[0] * d3_geo_radians - x0, y1 = coordinates[1] * d3_geo_radians, cx1 = Math.cos(x1), sx1 = Math.sin(x1), cy1 = Math.cos(y1), sy1 = Math.sin(y1), cc = mode !== "orthographic" ? sy0 * sy1 + cy0 * cy1 * cx1 : null, c, k = mode === "stereographic" ? 1 / (1 + cc) : mode === "gnomonic" ? 1 / cc : mode === "equidistant" ? (c = Math.acos(cc), c ? c / Math.sin(c) : 0) : mode === "equalarea" ? Math.sqrt(2 / (1 + cc)) : 1, x = k * cy1 * sx1, y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
return [ scale * x + translate[0], scale * y + translate[1] ];
}