X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-view-impl.cpp;h=20392a758e066a90bb7967b1b2338a1f2bb60a14;hp=48f0b9f492305fc5bafa78b734e5a0ccfbed6e63;hb=5ac4bb2cc34e65b05c3909508e9ac53d4672ebf2;hpb=bc67da251f806cfa64940c3799eeafb1fc6d8c73 diff --git a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp index 48f0b9f..20392a7 100644 --- a/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/base/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -2187,7 +2187,8 @@ bool ScrollView::OnTouchEvent(const TouchEvent& event) return false; } - if( event.GetPoint(0).state == TouchPoint::Down ) + const TouchPoint::State pointState = event.GetPoint(0).state; + if( pointState == TouchPoint::Down ) { DALI_LOG_SCROLL_STATE("[0x%X] Down", this); @@ -2202,9 +2203,10 @@ bool ScrollView::OnTouchEvent(const TouchEvent& event) StartTouchDownTimer(); } } - else if( event.GetPoint(0).state == TouchPoint::Up ) + else if( ( pointState == TouchPoint::Up ) || + ( ( pointState == TouchPoint::Interrupted ) && ( event.GetPoint(0).hitActor == Self() ) ) ) { - DALI_LOG_SCROLL_STATE("[0x%X] Up", this); + DALI_LOG_SCROLL_STATE("[0x%X] %s", this, ( ( pointState == TouchPoint::Up ) ? "Up" : "Interrupted" ) ); StopTouchDownTimer(); @@ -2213,8 +2215,8 @@ bool ScrollView::OnTouchEvent(const TouchEvent& event) // otherwise our scroll could be stopped (interrupted) half way through an animation. if(mGestureStackDepth==0 && mTouchDownTimeoutReached) { - unsigned timeDelta( event.time - mTouchDownTime ); - if ( timeDelta >= MINIMUM_TIME_BETWEEN_DOWN_AND_UP_FOR_RESET ) + if( ( event.GetPoint(0).state == TouchPoint::Interrupted ) || + ( ( event.time - mTouchDownTime ) >= MINIMUM_TIME_BETWEEN_DOWN_AND_UP_FOR_RESET ) ) { // Reset the velocity only if down was received a while ago mLastVelocity = Vector2( 0.0f, 0.0f );