I suggest to filter out items in `.layout()` method to only those which have offsetHeight > 0 http://joxi.ru/nAyBvVYugwZWlr.jpg