Showing 181 of 292 total issues
Function _pathToRelative
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pathToRelative = R._pathToRelative = function (pathArray) {
var pth = paths(pathArray);
if (pth.rel) {
return pathClone(pth.rel);
}
Function getRGB
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
R.getRGB = cacher(function (colour) {
if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) {
return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};
}
if (colour == "none") {
Consider simplifying this complex logical expression. Open
Open
if (res.type == "text") {
res.paper.canvas.style.display = E;
var span = res.paper.span,
m = 100,
fontSize = a.font && a.font.match(/\d+(?:\.\d*)?(?=px)/);
Function attr
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
elproto.attr = function (name, value) {
if (this.removed) {
return this;
}
if (name == null) {
Function eve
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
eve = function (name, scope) {
name = String(name);
var e = events,
oldstop = stop,
args = Array.prototype.slice.call(arguments, 2),
Function attr
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
elproto.attr = function (name, value) {
if (this.removed) {
return this;
}
if (name == null) {
Function data
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.data = (function() {
var _i, _len, _results;
_results = [];
for (index = _i = 0, _len = data.length; _i < _len; index = ++_i) {
row = data[index];
Function unbind
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
eve.off = eve.unbind = function (name, f) {
if (!name) {
eve._events = events = {n: {}};
return;
}
Function processPath
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
processPath = function (path, d, pcom) {
var nx, ny;
if (!path) {
return ["C", d.x, d.y, d.x, d.y, d.x, d.y];
}
Function parseDate
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Morris.parseDate = function(date) {
var isecs, m, msecs, n, o, offsetmins, p, q, r, ret, secs;
if (typeof date === 'number') {
return date;
}
Function addGradientFill
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addGradientFill = function (o, gradient, fill) {
o.attrs = o.attrs || {};
var attrs = o.attrs,
pow = Math.pow,
opacity,
Function interHelper
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function interHelper(bez1, bez2, justCount) {
var bbox1 = R.bezierBBox(bez1),
bbox2 = R.bezierBBox(bez2);
if (!R.isBBoxIntersect(bbox1, bbox2)) {
return justCount ? 0 : [];
Function redraw
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Donut.prototype.redraw = function() {
var C, cx, cy, i, idx, last, max_value, min, next, seg, total, value, w, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results;
this.el.empty();
this.raphael = new Raphael(this.el[0]);
cx = this.el.width() / 2;
Function drawXAxis
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Line.prototype.drawXAxis = function() {
var drawLabel, l, labels, prevAngleMargin, prevLabelMargin, row, ypos, _i, _len, _results,
_this = this;
ypos = this.bottom + this.options.padding / 2;
prevLabelMargin = null;
Function interPathHelper
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function interPathHelper(path1, path2, justCount) {
path1 = R._path2curve(path1);
path2 = R._path2curve(path2);
var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,
res = justCount ? 0 : [];
Function addEvent
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addEvent = (function () {
if (g.doc.addEventListener) {
return function (obj, type, fn, element) {
var f = function (e) {
var pos = getEventPosition(e);
Consider simplifying this complex logical expression. Open
Open
if (params[has](att)) {
if (!R._availableAttrs[has](att)) {
continue;
}
var value = params[att];
Function CubicBezierAtTime
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {
var cx = 3 * p1x,
bx = 3 * (p2x - p1x) - cx,
ax = 1 - cx - bx,
cy = 3 * p1y,
Function Hover
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Morris.Hover = (function() {
Hover.defaults = {
"class": 'morris-hover morris-default-style'
};
Function Grid
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Grid(options) {
var _this = this;
if (typeof options.element === 'string') {
this.el = $(document.getElementById(options.element));
} else {