Skip to content
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

Merged
merged 6 commits into from
Feb 13, 2018

Conversation

daybrush
Copy link
Member

Issue

#104 #105

Details

@coveralls
Copy link

coveralls commented Feb 13, 2018

Coverage Status

Coverage increased (+1.2%) to 82.915% when pulling bd67508 on younkue:JustifiedLayout#105 into 063714b on naver:master.

@@ -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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eg.Layout?

@@ -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>
Copy link
Contributor

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,
Copy link
Contributor

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]

@@ -90,6 +144,7 @@ describe("InfiniteGrid Test", function() {
// When (layout)
this.inst._renderer.container.innerHTML = items.join("");
this.inst.layout();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove it!

Copy link
Contributor

@sculove sculove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sculove sculove merged commit 9253e90 into naver:master Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants