diff --git a/YACReaderLibrary/qml/FlowView.qml b/YACReaderLibrary/qml/FlowView.qml index cb1c9a80..972865f4 100644 --- a/YACReaderLibrary/qml/FlowView.qml +++ b/YACReaderLibrary/qml/FlowView.qml @@ -148,27 +148,9 @@ Rectangle { acceptedButtons: Qt.LeftButton | Qt.RightButton onClicked: { - gotoIndex(index); + list.currentIndex = index; } } - - NumberAnimation { - id: anim; - target: list; - property: "contentX"; - duration: Math.min(850, Math.max(350, 75 * Math.abs(list.currentIndex - list.previousIndex))) - } - - function gotoIndex(idx) { - var pos = list.contentX; - var destPos; - list.previousIndex = list.currentIndex - list.positionViewAtIndex(idx, ListView.Beginning); - destPos = list.contentX; - anim.from = pos; - anim.to = destPos; - anim.running = true; - } } }