Author Topic: links difficult to use in swipeModel {on:true}  (Read 2261 times)

ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
links difficult to use in swipeModel {on:true}
« on: June 08, 2017, 02:48:21 am »
We have a grid that we are turning on the swipeModel for tablets and phones.  In the grid some cells have renderers that render a link to jump to another page.  When running on the tablet or phone it is very difficult to actually activate the link.  You have to press a number of times and if you are lucky it will activate the link.

I am assuming it may have something to do with the sensitivty of the swipe mechanism.  My guess is that since it is hard for you to perfectly touch down on the link and release without moving in some horizontal plane, param query is picking that up as an ever so slight swipe and not passing the touch on to the link.

There needs to be a way to set the sensitivity of the swipe to allow these links to work.

I know there is a "ratio" as part of the scrollModel - maybe that would do something, but it is not documented very well what the ratio is for.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: links difficult to use in swipeModel {on:true}
« Reply #1 on: June 08, 2017, 10:35:38 am »
You may assign "pq-no-capture" class to the link or the whole cell containing the link.

This class is documented in swipeModel.

https://paramquery.com/pro/api#option-swipeModel

ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
Re: links difficult to use in swipeModel {on:true}
« Reply #2 on: June 09, 2017, 02:29:07 am »
Thanks, that will probably work for us, although it was not clear to me that is what it was for. The documentation states that it will prevent swipe which is not exactly what we want since if you touch the link and drag you would expect swipe but if you tap the link you would expect it to activate.  So I think there still should be a "sensitivity" for swipe that allows you to keep the swipe "on" but can recognize the difference between a swipe and a tap.

The issue is if you had a grid full of links.  It would be hit or miss depending on where you touch when you swipe whether it would swipe or not.

In our case we do not have too many links - or they are just in a single column so it is unlikely users won't be able to swipe inmost cases.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: links difficult to use in swipeModel {on:true}
« Reply #3 on: June 12, 2017, 11:16:30 am »
Mouse sensitivity for swipe can be set with distance option.

https://api.jqueryui.com/mouse/#option-distance

Since grid derives from base mouse interaction widget, this option can be added along with other grid options.