Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
relativeConstrainedMove(x, y) {
const xFinal = constraints.x.min + mouse.localToGlobal(x, constraints.width);
const yFinal = constraints.y.min + mouse.localToGlobal(y, constraints.height);
if (constraints && constraints.x && constraints.x.min) {
robot.constrainedMove(xFinal, yFinal);
} else {
robot.moveMouseSmooth(xFinal, yFinal);
}
},
localToGlobal(current, max) {