virtuallist: Rewrite listitem replacing algorithm
authorYoumin Ha <youmin.ha@samsung.com>
Wed, 16 Jan 2013 03:57:33 +0000 (12:57 +0900)
committerYoumin Ha <youmin.ha@samsung.com>
Thu, 17 Jan 2013 08:50:21 +0000 (17:50 +0900)
commit8094e234de406bd3c10f5664977b3fbfd5042b4d
tree8ce0e5c2d685a62c7d19704debd570add010b7da
parentaf9ce75d00800c8da0cd9975d7a45774c6a0dc19
virtuallist: Rewrite listitem replacing algorithm

Older virtuallist only considered sequential move by flicking motion.
It cannot work correctly when scrollTo() is called by new scroll VI
implementation(3 flicking to top or bottom). The reolacing algorithm
is redesigned, to be able to handle immediate move(by scrollTo() to
arbitrary position.
New method 'scrollstart' event instead of old 'scrollstop'. When
'scrollstart' occurs, a timer function is run, which calculates the
number of lines to be changed. If the number is greater than 0, do
the listitem swap job. Otherwise, stop the timer function.

Solves N_SE-18618.

TODO: When dragging, 'scrollstart' is not fired, while the vlistview is
still moving. . Another detection method is needed.

Change-Id: I41f1413f33eef0826c933642658b0257383e9076
src/widgets/virtuallist/js/jquery.mobile.tizen.virtuallistview.js