Roboy / ravestate

✨ Ravestate is Roboy's reactive dialogue state library.
http://roboy.github.io/ravestate
BSD 3-Clause "New" or "Revised" License
25 stars 7 forks source link

Native horizontal scrolling #138

Closed josephbirkner closed 4 years ago

josephbirkner commented 4 years ago

It would be very useful to be able to scroll horizontally in the UI with natural scrolling gestures, such as two-finger pan or scroll-wheel. This could be achieved by wrapping the SVG area in a div that has overflow-x set to scroll. However, we would need to implement dynamic resizing of the SVG area based on its content.

josephbirkner commented 4 years ago

@nbasargin thoughts?

nbasargin commented 4 years ago

It's on my list. Right now, we move the SVG elements in the graph with transform property which gives nice transitions for free. The size of the graph needs to stay fixed for the automatic resizing. Wrapping the graph into two divs, one with a scrollbar and the other with the correct size set should allow scrolling.

nbasargin commented 4 years ago

PR's up: #142 :rocket: