From 222709bc15ace77ebf03e5a8e17e0bf026520970 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 24 Oct 2021 17:45:09 -0700 Subject: Many version bumps --- .../kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt') diff --git a/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt b/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt index e3baa94..78bf253 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/swipe/RelativeSlider.kt @@ -48,14 +48,18 @@ internal class RelativeSlider(var curPage: SwipeBackPage) : SwipeListener { return } when (edgeFlag) { - SWIPE_EDGE_LEFT -> page.swipeBackLayout.x = - min(-offset * max(1 - percent, 0f) + DEFAULT_OFFSET, 0f) - SWIPE_EDGE_RIGHT -> page.swipeBackLayout.x = - min(offset * max(1 - percent, 0f) - DEFAULT_OFFSET, 0f) - SWIPE_EDGE_TOP -> page.swipeBackLayout.y = - min(-offset * max(1 - percent, 0f) + DEFAULT_OFFSET, 0f) - SWIPE_EDGE_BOTTOM -> page.swipeBackLayout.y = - min(offset * max(1 - percent, 0f) - DEFAULT_OFFSET, 0f) + SWIPE_EDGE_LEFT -> + page.swipeBackLayout.x = + min(-offset * max(1 - percent, 0f) + DEFAULT_OFFSET, 0f) + SWIPE_EDGE_RIGHT -> + page.swipeBackLayout.x = + min(offset * max(1 - percent, 0f) - DEFAULT_OFFSET, 0f) + SWIPE_EDGE_TOP -> + page.swipeBackLayout.y = + min(-offset * max(1 - percent, 0f) + DEFAULT_OFFSET, 0f) + SWIPE_EDGE_BOTTOM -> + page.swipeBackLayout.y = + min(offset * max(1 - percent, 0f) - DEFAULT_OFFSET, 0f) } } -- cgit v1.2.3