-
Notifications
You must be signed in to change notification settings - Fork 96
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:
- provides various layouts
: GridLayout, JustifiedLayout, FrameLayout, SquareLayout, PackingLayout, ... - provides horizontal and vertical directions.
- provides
horizontal
option.
- provides
- 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.
- useRecycle
- horizontal
-
setLayout: After creating the instance of InfiniteGrid,
You should set the layout before using InfiniteGrid.
- getItems
- setLoadingBar
- getLoadingBar
- startLoading
- endLoading
- added change event
- added scrollPos, orgScrollPos, isScroll properties on layoutComplete event.
- count
- isRecycling
- getTopElement
- getBottomElement
- croppedCount and distance properties on layoutComplete event.
- scrollTop on append and prepend events.
- 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.