code: function getRows (items) {
    const data = {}
    const rows = [[]]
  
    data.stacks = true
  
    for (var i = 0; i < items.length; i++) {
      const el = items[i]
      const dim = el.getBoundingClientRect()
  
      if (!dim.height) {
        continue
      }
  
      for (var j = rows.length - 1; j >= 0; j--) {
        const row = rows[j]
  
        if (!row[0]) {
          row.push(el)
          break
        }
  
        var leftDim = row[0].getBoundingClientRect()
  
        if (dim.top >= Math.floor(leftDim.bottom)) {
          rows.push([el])
          break
        }
  
        if (Math.floor(dim.bottom) > leftDim.top) {
          data.stacks = false
  
          if (dim.left < leftDim.left && !isRtl) {
            row.unshift(el)
            break
          }
  
          row.push(el)
          break
        }
  
        if (j === 0) {
          rows.unshift([el])
          break
        }
      }
    }
  
    data.rows = rows
  
    return data
  }
docs: Copyright (c) 2013-2018 YOOtheme GmbH, getuikit.com