Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isPointOverPaper(mouseX, mouseY, paperContainer) {
const { left, top, width, height } = paperContainer.getBoundingClientRect();
const rect = new g.rect(left, top, width, height);
const point = new g.Point(mouseX, mouseY);
return rect.containsPoint(point);
}