mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Fix math in Node.isClientRectOnScreen() method
This commit is contained in:
parent
acdbad86d8
commit
3a1e085622
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user