File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
cmioslayer/src/main/java/crossmobile/ios/uikit Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -126,8 +126,10 @@ public void exec(UIGestureRecognizer arg) {
126126 double x = calculateNewPosition (-transl .getX (), contentSize .getWidth () + contentInset .getLeft () + contentInset .getRight () - getWidth (), shouldSpring );
127127 double y = calculateNewPosition (-transl .getY (), contentSize .getHeight () + contentInset .getTop () + contentInset .getBottom () - getHeight (), shouldSpring );
128128 if (pan .state () != UIGestureRecognizerState .Ended ) { // UIGestureRecognizerState.Changed
129- if (Math .sqrt (Math .pow (contentOffset .getX () - x , 2 ) + Math .pow (contentOffset .getY () - y , 2 )) > SELECTION_THRESHOLD ) {
130- // Dragging
129+ if (dragging )
130+ setContentOffset (x , y ); // no special animation
131+ else if (Math .sqrt (Math .pow (contentOffset .getX () - x , 2 ) + Math .pow (contentOffset .getY () - y , 2 )) > SELECTION_THRESHOLD ) {
132+ // Set dragging mode, disable component click mode
131133 invalidateTimers ();
132134 touchesCancelled (arg .touchList , arg .touchEvent );
133135 dragging = true ;
You can’t perform that action at this time.
0 commit comments