react-json-graph icon indicating copy to clipboard operation
react-json-graph copied to clipboard

Question: how to implement y-scroll on overflow instead of zoom?

Open 7ruth opened this issue 7 years ago • 2 comments

Hello, loving this library and how cleanly it represents my git commits.

I have one issue that I haven't been able to figure out. Is there a way, when I have a both, isVertical and isStatic set to true, to have additional nodes placed outside the height of the graph be scrollable to (instead of graph zoom on scroll).

Thank you for any ideas/ feedback.

7ruth avatar Apr 02 '18 15:04 7ruth

Hi @7ruth, it looks like you can create outer container with overflow-y and place there graph container that would be bigger. If I understood incorrect please provide more info or image. Thanks!

antonKalinin avatar Apr 04 '18 11:04 antonKalinin

Hi @antonKalinin, thank you for a quick response.

Here are some screenshots. I did exactly what you mention, the <Graph> component is wrapped in a div with smaller height and overflow-y set to scroll. Here is the effect:

screen shot 2018-04-04 at 1 00 07 pm At the start, all looks normal, overflowing as expected screen shot 2018-04-04 at 1 00 18 pm Initial scroll down also works fine screen shot 2018-04-04 at 1 11 43 pm but as you scroll back up the graph also zooms in screen shot 2018-04-04 at 1 00 37 pm

7ruth avatar Apr 04 '18 17:04 7ruth