[NUI] Fix ScrollTo to move pan position to the argument position (#1652)
authorjaehyun0cho <jaehyun0cho@gmail.com>
Thu, 4 Jun 2020 04:43:37 +0000 (13:43 +0900)
committerGitHub <noreply@github.com>
Thu, 4 Jun 2020 04:43:37 +0000 (13:43 +0900)
commit0945d40ab8aa0ba86b34a5841c90f1f6e2251a4f
tree60036dd16bc95a5373edf00143928706d444ddc7
parentc75563c6019305783107683c25797f176b5d23be
[NUI] Fix ScrollTo to move pan position to the argument position (#1652)

Previously, ScrollTo moved pan position including the ScrollableBase's
current position.
e.g. ScrollTo(360, true); //moves by 360
     ScrollTo(0, true); //moves by 360 again based on current position

The argument position is the new pan position. So the new position of
ScrollableBase becomes (-position).
To move ScrollableBase's position to (-position), it moves by
(-position - currentPosition).

Co-authored-by: Jaehyun Cho <jae_hyun.cho@samsung.com>
src/Tizen.NUI.Components/Controls/ScrollableBase.cs