Scroll to the end of overshoot only when overshoot is enabled
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / scrollable / scroll-view / scroll-view-impl.cpp
index 73e3453..7522766 100644 (file)
@@ -1578,7 +1578,12 @@ bool ScrollView::SnapWithVelocity(Vector2 velocity)
       }
     }
   }
-  positionSnap += clampDelta;
+
+  if(IsScrollComponentEnabled(Toolkit::Scrollable::OvershootIndicator))
+  {
+    // Scroll to the end of the overshoot only when overshoot is enabled.
+    positionSnap += clampDelta;
+  }
 
   bool animating = AnimateTo(positionSnap, positionDuration,
                              alphaFunction, false,