nativescript-vue-multi-drawer icon indicating copy to clipboard operation
nativescript-vue-multi-drawer copied to clipboard

how can I disable slide to open?

Open JungMinHur opened this issue 5 years ago • 7 comments
trafficstars

JungMinHur avatar Jun 05 '20 04:06 JungMinHur

You can set canSwipeOpen to false to disable it:

https://github.com/nativescript-vue/nativescript-vue-multi-drawer/blob/952d86a23ab79713e3aef1bd145bcdfb25dc8f64/index.js#L12

For example to disable swipe to open for the left drawer:

// in the drawer config
{
  left: {
    canSwipeOpen: false
  }
}

rigor789 avatar Jun 06 '20 10:06 rigor789

Thanks for your apply!!

is there a way to disable all swipe actions? not just open

JungMinHur avatar Jun 08 '20 01:06 JungMinHur

What do you mean exactly? Completely disable user interaction?

rigor789 avatar Jun 08 '20 20:06 rigor789

yes I mean, completely block swipe actions to open and close

JungMinHur avatar Jun 09 '20 01:06 JungMinHur

as far i can tell, you must provider false to each side. {left: {canSwipeOpen: false}, top: {canSwipeOpen: false}, right: {canSwipeOpen: false}, bottom: {canSwipeOpen: false}}

gravataLonga avatar Jun 21 '20 10:06 gravataLonga

yep! I know how to disable swipe open, but I want to know how to disable close too. It seems that even if I set {canSwipeOpen: false} swipe to close is still working!

JungMinHur avatar Jun 23 '20 01:06 JungMinHur

There's no way right now - but you could easily implement a static "drawer" with GridLayout+animate yourself, using this is pointless if you want to disable everything - since all this package does is add the gesture handling, and the slot handling.

rigor789 avatar Jun 23 '20 08:06 rigor789