From: Joogab Yun Date: Tue, 13 Jul 2021 03:14:43 +0000 (+0900) Subject: Revert "[NUI] Change InterceptTouchEvent." X-Git-Tag: accepted/tizen/unified/20231205.024657~1682 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e74f6992c26a7fbb31616367a421770f8fe1faf8;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Revert "[NUI] Change InterceptTouchEvent." This reverts commit dbe26102b8c8f4473cb6ea08064dbcb916fbd3a8. --- diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index 3c894ba..9405f47 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -293,12 +293,10 @@ namespace Tizen.NUI.Components if (mScrollEnabled) { mPanGestureDetector.Detected += OnPanGestureDetected; - this.InterceptTouchEvent += OnInterruptTouchingChildTouched; } else { mPanGestureDetector.Detected -= OnPanGestureDetected; - this.InterceptTouchEvent -= OnInterruptTouchingChildTouched; } } } @@ -587,7 +585,6 @@ namespace Tizen.NUI.Components private PropertyNotification propertyNotification; private float noticeAnimationEndBeforePosition = 0.0f; private bool readyToNotice = false; - private bool shouldIntercept = false; /// /// Notice before animation is finished. @@ -638,8 +635,6 @@ namespace Tizen.NUI.Components mPanGestureDetector.AddDirection(PanGestureDetector.DirectionVertical); if (mPanGestureDetector.GetMaximumTouchesRequired() < 2) mPanGestureDetector.SetMaximumTouchesRequired(2); mPanGestureDetector.Detected += OnPanGestureDetected; - //Interrupt touching when panning is started - this.InterceptTouchEvent += OnInterruptTouchingChildTouched; ClippingMode = ClippingModeType.ClipToBoundingBox; @@ -708,7 +703,7 @@ namespace Tizen.NUI.Components StopScroll(); } } - return shouldIntercept; + return true; } private void OnPropertyChanged(object source, PropertyNotification.NotifyEventArgs args) @@ -853,6 +848,8 @@ namespace Tizen.NUI.Components private void OnScrollAnimationEnded() { scrolling = false; + this.InterceptTouchEvent -= OnInterruptTouchingChildTouched; + ScrollEventArgs eventArgs = new ScrollEventArgs(ContentContainer.CurrentPosition); ScrollAnimationEnded?.Invoke(this, eventArgs); } @@ -1033,7 +1030,6 @@ namespace Tizen.NUI.Components mPanGestureDetector.Dispose(); mPanGestureDetector = null; } - this.InterceptTouchEvent -= OnInterruptTouchingChildTouched; propertyNotification.Dispose(); } @@ -1344,8 +1340,9 @@ namespace Tizen.NUI.Components if (panGesture.State == Gesture.StateType.Started) { - shouldIntercept = false; readyToNotice = false; + //Interrupt touching when panning is started + this.InterceptTouchEvent += OnInterruptTouchingChildTouched; AttachOverShootingShadowView(); Debug.WriteLineIf(LayoutDebugScrollableBase, "Gesture Start"); if (scrolling && !SnapToPage) @@ -1357,7 +1354,6 @@ namespace Tizen.NUI.Components } else if (panGesture.State == Gesture.StateType.Continuing) { - shouldIntercept = true; if (ScrollingDirection == Direction.Horizontal) { // if vertical shadow is shown, does not scroll. @@ -1418,7 +1414,6 @@ namespace Tizen.NUI.Components totalDisplacementForPan = 0; scrolling = true; readyToNotice = true; - shouldIntercept = false; OnScrollAnimationStarted(); } }