Draggable menu button


#1

Hi,

(sorry for my english, I’m a young french developper…)

I’m developping an Ionic app, and I would like my menu to be a draggable button (like messenger chatheads) over the pages (it opens a simple modal which contains my menu), even over the many modals of my app…

I tried many ways to do it but I can’t manage to do it alone, so I’m asking for your help…

Furthermore, I want this button to have a “onHold” function, and I don’t know if it’s a problem (for instance, if I hold the button to drag it somewhere on my screen, will the onHold function be activated and open my menu :confused: ?)

Thank you !


#2

first of all you can not stack modal, because this is not a could ui and ux.

And yes, a logic to handle drag and drop is not that easy and if you have another action like onHold, what is mostly the same like dragstart it is even more complex.

Maybe you should add a timer like --> touchstart, if touchmove in the next 300ms it is drag, else open menu and cancel touchstart


#3

Any progress on this ?? I need to implement the same so any help would be highly appreciated