View Full Version : [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
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.
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
Yeah, we are aware of that issue. Will be fixed in the next release.
6 Jul 2010, 3:40 PM
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
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.
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. :)
Powered by vBulletin® Version 4.1.5 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.