2 Jul 2010 9:44 AM #1
[FIXED] showBy and list items
Actually I'm not sure if this is a bug or a feature request but the Ext.Component.showBy function doesn't work well with list items once the list is scrolled. The component is not at the right position.
I believe this is due to the 3d transformation and I managed to get it to work by using the offset of the list's scroller and writing my own showBy function.
Setting the offset parameter of the showBy function wasn't enough. It wasn't working fine when the anchor was on top.
I'm not posting my fix because it's not an override, I'm not sure this is a bug and I have not tested it with other elements.
2 Jul 2010 12:04 PM #2
Thanks for the report. Would it be possible for you to give us some source code that we can run to reproduce this? That would definitely help us in hunt down any related bugs.
2 Jul 2010 2:21 PM #3
Here it is. Replace the index.js file from the list example with this one and tap an item, then scroll a bit and tap another item. You should see the difference.
I noticed another small problem with the grouped list. In the same example, sometimes the A group covers part of the first item when you scroll back to the top of the list a bit too fast.
2 Jul 2010 3:04 PM #4
Yeah, we are aware of that issue. Will be fixed in the next release.
6 Jul 2010 3:40 PM #5
Ok, the header not returning to its correct place has been fixed in the next version.
The misplacement of the overlay when the list is scroller is a harder problem to fix. You are right that it breaks because of the webkit-transform. The transform is not taken into account in getXY. Doing this would slow the function down quite a bit. May I ask how you worked around this? I'm very interested in your solution.
6 Jul 2010 5:39 PM #6
I found some obscure method in webkit called window.webkitConvertPointFromNodeToPage. It gives the x and y coordinates on the page for any element. It seems to be available on both Android and iOS and takes webkit transforms into account! This just reduced the getXY function on Element from ~65 lines to 2 lines, made it probably 1000 times as fast, while taking webkit transforms into account and thus fixing the problem you are encountering. Together with the fact that the Netherlands just got to the finals of the WC, this totally made my day.
This will all be part of the next release.
7 Jul 2010 9:43 AM #7
We don't see often so many good news in one post
I believe you don't need to know how I did it anymore.
Hopefully it will fix a quite huge slow down I'm experiencing. But I haven't looked into it yet, maybe it's something completely different.
Good luck for your final, we are neighbor (Belgium) and we are supporting you.
By ritesh.kapse in forum Ext 2.x: Help & DiscussionReplies: 13Last Post: 29 Oct 2010, 5:29 AM
By n3b in forum Community DiscussionReplies: 0Last Post: 18 Mar 2010, 11:21 AM
By sdc in forum Ext GWT: Bugs (1.x)Replies: 3Last Post: 16 Jul 2008, 11:50 PM
By yuiman in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 31 May 2008, 6:59 PM
By doubleforte in forum Ext 2.x: Help & DiscussionReplies: 2Last Post: 25 Oct 2007, 8:56 AM