mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
Merge pull request #1269 from AlexIII/fix_isClientRectOnScreen
Fix math in Node.isClientRectOnScreen() method
This commit is contained in:
commit
24f50d2df5
@ -2488,8 +2488,8 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
|
|||||||
const screenRect = {
|
const screenRect = {
|
||||||
x: -margin.x,
|
x: -margin.x,
|
||||||
y: -margin.y,
|
y: -margin.y,
|
||||||
width: stage.width() + margin.x,
|
width: stage.width() + 2 * margin.x,
|
||||||
height: stage.height() + margin.y,
|
height: stage.height() + 2 * margin.y,
|
||||||
};
|
};
|
||||||
return Util.haveIntersection(screenRect, this.getClientRect());
|
return Util.haveIntersection(screenRect, this.getClientRect());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user