1.2.7 • Published 28 days ago

@astroimg/equal-height-waterfall v1.2.7

Weekly downloads
-
License
-
Repository
-
Last release
28 days ago

equal-height-waterfall

  • break line when sum of aspect ratio > 2
  • item's min width > 1/4 container's width
  • item's max width < 2/3 container's width
  • item's max height < 300

Install

npm install @astroimg/equal-height-waterfall -S

Usage

import { EqualHeightWaterfall } from '@urcloud/equal-height-waterfall'
const ins = new EqualHeightWaterfall({
  containerWidth: window.screen.width,
  breakLineAspectRatioSum: 2,
  itemFallbackAspectRatio: 1,
  itemMinWidthPercent: 1 / 4,
  itemMaxWidthPercent: 2 / 3,
  itemMaxHeight: 400,
  gutter: 4
})
const { items, renderTotalHeight } = ins.add()
1.2.7

28 days ago

1.2.6

28 days ago

1.2.5

6 months ago

1.2.4

6 months ago