Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49421

Swipe list - differentiate between swipe and drag

$
0
0

@aavelyn wrote:

I’m using the ion-item-sliding for todos and I want the item to execute a method (like delete) only for a swipe gesture while the user still can drag the item. Thus if the user starts to swipe but doesn’t let go it will count as a drag action.

so far the ionSwipe has a _openAmount property which lets me set a value before the task is checked off.

	checkOff(task: Task, event) {
		if (event._openAmount > 70) {
		    task.isOpen = false
		}
	}

I’m using ngClass to let the item translateX out of the screen

this however is not user friendly since the user has to swipe a distance of 70px and any swipe/drag longer than 70px will trigger the ngClass.

Is there a way to distinguish between a drag and swipe?

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49421

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>