Skip to content

Migrating from v2.0 to v3.0

Son Chan Uk edited this page Dec 18, 2017 · 9 revisions

InfiniteGrid 3.0.0 rewrote 2.0.0 to provide various layouts. this new version of InfiniteGrid had following features:

  1. provides various layouts
    : GridLayout, JustifiedLayout, FrameLayout, SquareLayout, PackingLayout, ...
  2. provides horizontal and vertical directions.
    • provides horizontal option.
  3. improves usability.
    • No more requests. It is caching previous added items.
    • No more count option is required. It is automatically adjusted internally according to the size of the screen.

New Feature

  • useRecycle
  • horizontal

Method

Event

BREAKING CHANGES

1. Removed

Options
  • count
Method
  • isRecycling
  • getTopElement
  • getBottomElement
Event property
  • croppedCount and distance properties on layoutComplete event.
  • scrollTop on append and prepend events.

2. Changed

  • The return value of the getGroupKeys method returns the group key of the card instead of returning the key value of all cards.
// infiniteGrid 2.x
instance.getGroupKeys(); // [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]

// infiniteGrid 3.x
instance.getGroupKeys(); // [1, 2, 3]
instance.getGroupKeys(true); // [0, 1, 2, 3]
  • The return value of the append method has changed from number to this.
  • The return value of the prepend method has changed from number to this.