metafizzy / outlayer

:construction_worker: the brains & guts of a layout library
163 stars 63 forks source link

Do not layout items that are isHidden #14

Open desandro opened 10 years ago

desandro commented 10 years ago

Per desandro/masonry#496, items that are isHidden should not need to be laid out. Consider changing _getItemsForLayout to

Masonry.prototype._getItemsForLayout = function( items ) {
  var layoutItems = [];
  for ( var i=0, len = items.length; i < len; i++ ) {
    var item = items[i];
    if ( !item.isIgnored && !item.isHidden ) {
      layoutItems.push( item );
    }
  }
  return layoutItems;
};
sculove commented 9 years ago

+1