nativescript-community / ui-drawer

NativeScript plugin that allows you to easily add a side drawer (side menu) to your projects.
https://nativescript-community.github.io/ui-drawer/
Apache License 2.0
24 stars 12 forks source link

Is there any way to know slide state by gesture? #19

Open Woongsik opened 1 year ago

Woongsik commented 1 year ago

Hi, thanks for the great plugin!

I wonder if there is a way to know about slide state by gesture... I know the this.$refs.drawer.isOpened() manually but I am looking for a way to get it by gesture and emit from the component. Since the component uses swipe gesture ...

ie. <Drawer @leftSlideState="(open or close) => {}"> Any workaround is also welcome...

farfromrefug commented 1 year ago

Yes should be doable. Can't do it right now. Would you want to create a PR?

Woongsik commented 1 year ago

Hi, I can try it. Could you give me a quick instruction that I should look into?

farfromrefug commented 1 year ago

@Woongsik the repo readme has instructions on how to use it. As for the code you could simply emit where you want to notify of state change.