mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Filter out invisible elements in DomElement.isVisible() check.
This commit is contained in:
parent
23a0db603f
commit
65bfb091e1
1 changed files with 3 additions and 2 deletions
|
@ -70,8 +70,9 @@ var DomElement = new function() {
|
|||
isVisible: function(el) {
|
||||
// See if the scrolled bounds intersect with the windows rectangle
|
||||
// which always starts at 0, 0
|
||||
return new Rectangle([0, 0], DomElement.getWindowSize())
|
||||
.intersects(DomElement.getBounds(el, false, true));
|
||||
return !DomElement.isInvisible(el)
|
||||
&& new Rectangle([0, 0], DomElement.getWindowSize())
|
||||
.intersects(DomElement.getBounds(el, false, true));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue