[dali_1.0.1] Merge branch 'tizen'
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / public-api / controls / scrollable / scroll-view / scroll-view.cpp
index db5797e..8c37842 100644 (file)
@@ -239,6 +239,10 @@ unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
   // spacing must be present.
   if(mEnabled && fabsf(mSpacing) > Math::MACHINE_EPSILON_1)
   {
+    if( wrap )
+    {
+      position = WrapInDomain(position, mDomain.min, mDomain.max);
+    }
     page = floor((position - mDomain.min) / mSpacing + 0.5f);
 
     if(wrap)
@@ -275,8 +279,6 @@ const std::string ScrollView::SCROLL_PRE_POSITION_PROPERTY_NAME( "scroll-pre-pos
 const std::string ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME( "scroll-overshoot-x" );
 const std::string ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME( "scroll-overshoot-y" );
 const std::string ScrollView::SCROLL_FINAL_PROPERTY_NAME( "scroll-final" );
-const std::string ScrollView::SCROLL_X_PROPERTY_NAME( "scroll-x" );
-const std::string ScrollView::SCROLL_Y_PROPERTY_NAME( "scroll-y" );
 const std::string ScrollView::SCROLL_SCALE_PROPERTY_NAME( "scroll-scale" );
 const std::string ScrollView::SCROLL_WRAP_PROPERTY_NAME( "scroll-wrap" );
 const std::string ScrollView::SCROLL_PANNING_PROPERTY_NAME( "scroll-panning" );