mirror of
https://github.com/konvajs/konva.git
synced 2025-10-20 19:01:04 +08:00
Fix math in Node.isClientRectOnScreen() method
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user