Showing 225 of 356 total issues
Function setPointersPositions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
setPointersPositions(evt) {
var contentPosition = this._getContentPosition(),
x: number | null = null,
y: number | null = null;
evt = evt ? evt : window.event;
Function getTrace
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
getTrace(relaxed?: boolean, rounded?: boolean) {
var traceArr = this.traceArr,
len = traceArr.length,
str = '',
n,
Function _isMatch
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
_isMatch(selector: string | Function) {
if (!selector) {
return false;
}
if (typeof selector === 'function') {
Function getCursor
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getCursor(anchorName, rad, rotateCursor) {
if (anchorName === 'rotater') {
return rotateCursor;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Kaleidoscope
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const Kaleidoscope: Filter = function (imageData) {
var xSize = imageData.width,
ySize = imageData.height;
var x, y, xoff, i, r, g, b, a, srcPos, dstPos;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _stroke
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_stroke(shape) {
var dash = shape.dash(),
// ignore strokeScaleEnabled for Text
strokeScaleEnabled = shape.getStrokeScaleEnabled();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function calcLength
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
static calcLength(x, y, cmd, points) {
var len, p1, p2, t;
var path = Path;
switch (cmd) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Solarize
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const Solarize: Filter = function (imageData) {
var data = imageData.data,
w = imageData.width,
h = imageData.height,
w4 = w * 4,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getAbsoluteZIndex
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
getAbsoluteZIndex() {
var depth = this.getDepth(),
that = this,
index = 0,
nodes,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _sceneFunc
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
_sceneFunc(context: Context) {
var anim = this.animation(),
index = this.frameIndex(),
ix4 = index * 4,
set = this.animations()[anim],
Function decompose
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
decompose() {
var a = this.m[0];
var b = this.m[1];
var c = this.m[2];
var d = this.m[3];
Function getSelfRect
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
getSelfRect() {
if (!this.glyphInfo.length) {
return {
x: 0,
y: 0,
Function drawHit
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawHit(can?: HitCanvas, top?: Node, skipDragCheck = false) {
if (!this.shouldDrawHit(top, skipDragCheck)) {
return this;
}
Function _addListeners
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_addListeners() {
// start listeners
this.tween.onPlay = () => {
this.anim.start();
};
Function _createAnchor
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
_createAnchor(name) {
var anchor = new Rect({
stroke: 'rgb(0, 161, 255)',
fill: 'white',
strokeWidth: 1,
Function Contrast
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Contrast: Filter = function (imageData) {
var adjust = Math.pow((this.contrast() + 100) / 100, 2);
var data = imageData.data,
nPixels = data.length,
Function ElasticEaseInOut
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
ElasticEaseInOut(t, b, c, d, a, p) {
// added s = 0
var s = 0;
if (t === 0) {
return b;
Function _pointerleave
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
_pointerleave(evt) {
const events = getEventsMap(evt.type);
const eventType = getEventType(evt.type);
if (!events) {
Function _sceneFunc
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
_sceneFunc(context: Context) {
context.setAttr('font', this._getContextFont());
context.setAttr('textBaseline', this.textBaseline());
context.setAttr('textAlign', 'left');
context.save();
Function _getAbsoluteTransform
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
_getAbsoluteTransform(top?: Node) {
var at: Transform;
// we we need position relative to an ancestor, we will iterate for all
if (top) {
at = new Transform();