-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Buffer fix #25
Buffer fix #25
Conversation
@@ -40,7 +40,7 @@ export default Ember.Component.extend({ | |||
// this.lastCell = undefined; | |||
// this.cellCount = undefined; | |||
this.contentElement = undefined; | |||
this._cells = []; | |||
this._cells = Ember.A([]); |
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.
Why did you add this?
Is there a way we can test the buffer without digging into state variables on the collection component? Specifically I'm talking about var buffer = view.get('buffer') | 5;
var width = view.get('width') | 0;
var itemWidth = view.get('itemWidth') || 1; I'm happy to merge as is if its not feasible, but I suspect it should be by analyzing the DOM? cc @raytiley |
Also, please rebase against master. In the ember projects we only merge master for long running branches. |
The real problem vs "digging into state" is that I'm doing a calculation that is really done by the layout, which I don't have access to. This could be done if |
Gotcha. |
I'll rebase ... anything else for the moment? If/when "sliceDidChange" goes through & in order to write tests for |
No, it's fine how it is other than the Ember.A() thing. You can leave a TODO comment about updating the tests later if you want. |
Ah -- didn't notice your Ember.A comment; sorry:
further down will break if you don't wrap in Ember.A. |
That's gotta be it.
|
I think if you swap |
Um... so should I put in a separate pull request to not use pushObject? |
ah -- just what I was thinking |
:D I gotta run, I'll be back in a little while. |
Sure ... Should I create a new PR with pushObject -> push and https://github.com/rwjblue/ember-disable-prototype-extensions installed? |
@shaunc Yes exactly. You might have to add Ember.A() in some tests but I doubt it. |
… rendered and other content not
@mmun -- ok -- I have rebased |
Buffer should be added for both previous and next items, but only previous items were buffered.