-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggest that the 'setLayout' method supports Layout instance. #106
Conversation
31a24a0
to
ada9abe
Compare
src/InfiniteGrid.js
Outdated
@@ -161,7 +161,7 @@ class InfiniteGrid extends Component { | |||
/** | |||
* Specifies the Layout class to use. | |||
* @ko 사용할 Layout 클래스를 지정한다. | |||
* @param {Class} LayoutKlass The Layout class to use <ko>사용할 Layout 클래스</ko> | |||
* @param {Class|eg.Layout} LayoutKlass The Layout class to use or an instance of a layout moudle<ko>사용할 Layout 클래스 또는 레이아웃 모듈의 인스턴스</ko> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eg.Layout?
src/layouts/JustifiedLayout.js
Outdated
@@ -11,6 +11,8 @@ import {getStyleNames, assignOptions} from "../utils"; | |||
* @param {Boolean} [options.horizontal=false] Direction of the scroll movement (false: vertical, true: horizontal) <ko>스크롤 이동 방향 (false: 세로방향, true: 가로방향)</ko> | |||
* @param {Boolean} [options.minSize=0] Minimum size of item to be resized <ko> 아이템이 조정되는 최소 크기 </ko> | |||
* @param {Boolean} [options.maxSize=0] Maximum size of item to be resized <ko> 아이템이 조정되는 최대 크기 </ko> | |||
* @param {Boolean} [options.column=0] The number of items in a line <ko> 한 줄에 들어갈 수 있는 아이템의 개수 </ko> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
한 줄에 들어가는 아이템의 갯수를 정한다.
@@ -30,6 +32,7 @@ var layout = new eg.InfiniteGrid.JustifiedLayout({ | |||
margin: 10, | |||
minSize: 100, | |||
maxSize: 300, | |||
column: 5, | |||
horizontal: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change interface.
remove maxColumn
column: 2
// or
column: [2, 10]
test/unit/InfiniteGrid.spec.js
Outdated
@@ -90,6 +144,7 @@ describe("InfiniteGrid Test", function() { | |||
// When (layout) | |||
this.inst._renderer.container.innerHTML = items.join(""); | |||
this.inst.layout(); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue
#104 #105
Details