// INTERNAL INCLUDES
#include <dali/public-api/events/mouse-wheel-event.h>
-#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h>
#include <dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view-constraints.h>
+#include <dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h>
+#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-effect-impl.h>
-#include <dali-toolkit/internal/controls/scroll-component/scroll-component-impl.h>
#include <dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.h>
// TODO: Change to two class system:
mGestureStackDepth = 0;
- EnableGestureDetection( Gesture::Type( Gesture::Pan | Gesture::Pinch ) );
+ EnableGestureDetection( Gesture::Type( Gesture::Pan ) );
// For pan, default to only 1 touch required, ignoring touches outside this range.
SetTouchesRequiredForPanning(1, 1, false);
{
Actor self = Self();
PanGestureDetector panGesture( GetPanGestureDetector() );
- PinchGestureDetector pinchGesture( GetPinchGestureDetector() );
if((!mSensitive) && (sensitive))
{
mSensitive = sensitive;
panGesture.Attach(self);
- pinchGesture.Attach(self);
}
else if((mSensitive) && (!sensitive))
{
- mSensitive = sensitive;
+ // while the scroll view is panning, the state needs to be reset.
+ bool isPanning = self.GetProperty<bool>( mPropertyPanning );
+ if ( isPanning )
+ {
+ PanGesture cancelGesture( Gesture::Cancelled );
+ OnPan( cancelGesture );
+ }
+
panGesture.Detach(self);
- pinchGesture.Detach(self);
+ mSensitive = sensitive;
mGestureStackDepth = 0;
- self.SetProperty(mPropertyPanning, false);
-
- // Remove X & Y position constraints as they are not required when we are not panning.
- self.RemoveConstraint(mScrollMainInternalXConstraint);
- self.RemoveConstraint(mScrollMainInternalYConstraint);
}
}
OnGestureEx(gesture.state);
}
-void ScrollView::OnPinch(PinchGesture gesture)
-{
- // TODO: Reintroduce the pinch functionality for scaling.
-}
-
void ScrollView::OnGestureEx(Gesture::State state)
{
// call necessary signals for application developer