-
Notifications
You must be signed in to change notification settings - Fork 80
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
Remove#461 #464
Remove#461 #464
Conversation
return v; | ||
})); | ||
this._waitResource(items, isRefresh); | ||
layout: function(isRelayout, addItems, isAppend) { |
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.
The params description should be declared o API doc
http://naver.github.io/egjs/latest/doc/eg.InfiniteGrid.html#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.
I apply it in #465 pr
also, I will add comment.
if (isInit) { | ||
$.each(addItems, function(i, v) { | ||
v.el.style.position = "absolute"; | ||
}); |
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.
addItems
seems to be element array. Just wrapping and executing once will be more efficient.
$(addItems).css("position", "absolute");
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.
Ok I will apply in #465 pr
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.
I restore it.
we should process item.el
. so I didn't apply it.
var max = -Infinity; | ||
$.each(this._getColItems(false), function(i, v) { | ||
if (v && v.position.y + v.size.height > max) { | ||
max = v.position.y + v.size.height; |
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.
Duplication happens.
Just set local variable to sustain v.position.y + v.size.height
and use that for reassignment.
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.
Ok I will apply in #465 pr
Issue
#461, #454
Details
Preferred reviewers
@netil