CIDARLAB / 3DuF

Prefer that unbound methods are called with their expected scope JS-0387
Anti-pattern
Major
3 occurrences in this check
Avoid referencing unbound methods which may cause unintentional scoping of this. If your function does not access this, you can annotate it with this: void, or consider using an arrow function instead
279    }
280
281    constructMouseUpEvent(tool1: any, tool2: any, tool3: any) {
282        return this.constructMouseEvent(tool1.up, tool2.up, tool3.up, this.__mouseMoveCallback);283    }
284
285    /**
Avoid referencing unbound methods which may cause unintentional scoping of this. If your function does not access this, you can annotate it with this: void, or consider using an arrow function instead
275    }
276
277    constructMouseMoveEvent(tool1: any, tool2: any, tool3: any) {
278        return this.constructMouseEvent(tool1.move, tool2.move, tool3.move, this.__mouseUpCallback);279    }
280
281    constructMouseUpEvent(tool1: any, tool2: any, tool3: any) {
Avoid referencing unbound methods which may cause unintentional scoping of this. If your function does not access this, you can annotate it with this: void, or consider using an arrow function instead
268        console.log("Tool1: ", tool1, "Tool2: ", tool2, "Tool3: ", tool3);
269        if (tool1 === tool3) {
270            console.log("Both right and left tool is the same");
271            return this.constructMouseEvent(tool1.down, tool2.down, tool3.rightdown, this.__mouseDownCallback);272        } else {
273            return this.constructMouseEvent(tool1.down, tool2.down, tool3.down);
274        }