Filter out invisible elements in DomElement.isVisible() check.

This commit is contained in:
Jürg Lehni 2011-06-20 22:51:05 +01:00
parent 23a0db603f
commit 65bfb091e1

View file

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