Merge pull request #1269 from AlexIII/fix_isClientRectOnScreen

Fix math in Node.isClientRectOnScreen() method
This commit is contained in:
Anton Lavrenov 2022-01-20 10:28:34 -05:00 committed by GitHub
commit 24f50d2df5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2488,8 +2488,8 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
const screenRect = {
x: -margin.x,
y: -margin.y,
width: stage.width() + margin.x,
height: stage.height() + margin.y,
width: stage.width() + 2 * margin.x,
height: stage.height() + 2 * margin.y,
};
return Util.haveIntersection(screenRect, this.getClientRect());
}