Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229351

How to change the start position of the "swipeBackEnabled" gesture

$
0
0

Yes it is indeed possible.

As example we take your swipe Event in TS:

swipeEvent($e) {
  $e.deltaX = -130;
}

Initialize this function and your card will be on the left. :blush:

EDIT: I misread your question I am sorry.
But what you can also do is in your HTML you add the swipeEvent as example like this:

HTML
<div (swipe)="swipeEvent($event)"><div>

TS

swipeEvent($e) {
  if ($e.deltaX <= 10) {
      //add swipe back code here
      };
}

If you swipe to the right and added the swipe back code then you should come to the page you were before and it will start more in the middle if you want to switch sides then just a minus infront of 10.


Viewing all articles
Browse latest Browse all 229351

Trending Articles



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