dTree icon indicating copy to clipboard operation
dTree copied to clipboard

how to handle touch events

Open mle-moni opened this issue 3 years ago • 1 comments

I do not see where you handle mouse events to navigate in the family chart on your code, do you have any clues on how I could handle touch events to make it work on mobile too?

mle-moni avatar Apr 17 '21 10:04 mle-moni

Currently the library allows for setting callbacks (e.g. "nodeClick") for mouse clicks.

The callbacks are handled here: https://github.com/ErikGartner/dTree/blob/3bb7cbaa8de2fad4fe1481699ea484bf2603119b/dist/dTree.js#L123

Not sure if it applies to touch event or if you need to setup another D3 listener for that.

/Erik

ErikGartner avatar Apr 17 '21 10:04 ErikGartner