Fix math in Node.isClientRectOnScreen() method

This commit is contained in:
Alexander Chernoskutov 2022-01-20 16:06:18 +05:00
parent acdbad86d8
commit 3a1e085622

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());
}