enyo.VirtualList on scrolling down behavior

edited February 2012 in Enyo 1.0
In enyo.VirtualList -- there are refresh and setupRow default methods, in which calling refresh would trigger setupRow.
However, i notice that setupRow would be call upon scrolling down the list -- though I never call refresh().
This made dragging a list is so draggy ~ not smooth.

Is there a way to trace this e.g. I want to disabled setupRow upon scrolling down the list?

Thanks!

Comments

  • VirtualList employs a paging strategy, so it doesn't render all rows in the list initially. As you scroll down, it starts to render more list rows, calling setupRow to determine how you want to display the list. You cannot disable setupRow, otherwise new list items would not render.
  • Thanks rsanchez1, i think you're right. Earlier my issue was worsened due to I specify acquirePage function. Too many re-render. Now slightly better after I remove the function. I am contemplating to try VirtualRepeater, but the sample (from enyo package) does not show much better experience.

    And i feel that draggy experience is not the top issue, but the way it re-renders in browser, gave me momentary "blank" list. Definitely not good.

    I hope this is going to be fixed in Enyo 2. I expect the smoothness like in IOS where small touch will push the list up and down smoothly, as if you're pushing your toy on top of oily surface.

    I hope someone in Enyo core team read this. Thanks.
  • Yep, I've personally been, for lack of a better word, complaining about list performance in Enyo, especially when compared with list performance in Mojo (the JS framework used on webOS before Enyo was developed). I've noticed several people share the same opinion, so I definitely HOPE someone in the Enyo team took notice.
  • i hope that we can come up with some solution for the existing code, but it might be better to just transition to the new framework.
  • Yes and hopefully they won't take a step backwards again with respect to list performance.
  • I know we're doing a lot of testing on multiple platforms with the new stuff. However, we're generally finding that Android's browser doesn't do the kinds of CSS transforms that allow for scrolling of just a region of a page very quickly, and it hasn't gotten much better in Ice Cream Sandwich.
  • It seems that a part of the problem is related to handling of Touch events within the Android WebKit itself.

    Removing the call to "preventDefault()" on the touchstart event in enyo 1.0 line 2694 results in removing the error message, and the app stays responsive. However, it pretty much completely breaks scrolling.
  • edited February 2012
    Something else you can try is to hook into the touch events and scroll the list with a custom solution. What I posted here will scroll the list by the specified amountToScroll. The scrolling component uses an integrator to simulate kinetic scrolling. Maybe a different one provides better performance on Android.

    http://forums.enyojs.com/discussion/61/simulate-dragging-in-enyo#Item_2

    I googled kinetic scrolling iOS and came up with this page that does a decent job of explaining the math:

    http://ariya.ofilabs.com/2011/10/flick-list-with-its-momentum-scrolling-and-deceleration.html
  • I just discovered the "TransformScroller" that is hiding in this Enyo thing, and it's performance seems to be quite a bit better on webOS and Android, although still getting that error message on Android.

    Also, another quirk with lists (unrelated to the above change), is that during scrolling, I'm getting click events .. not quite sure how to handle those.
Sign In or Register to comment.