jsoncrack.com
jsoncrack.com copied to clipboard
Adaptive collapsing of node trees
Feature
A good addition could be to re-render the node tree when a node is collapsed or expanded. This would reduce the spread of different nodes around those less important to the user. Making the nodes draggable could be a different approach, but I might be getting ahead.
Thank you very much for the tool!!!
Cheers, Jannick
Alternative solutions or implementations
No response
Other context
No response
This would be really great, to trigger this the nodes and edges data should be updated. This behaviour will trigger a render on whole canvas and cause lagging while painting large data. To avoid this current behaviour is to hide/display through CSS. We can take suggestions for this in this issue.
I have no expertise in Webdev, so i fear that my capabilities to support here will be limited.
Hi @tram98, it would be expensive to trigger a re-render when expanding or collapsing nodes, especially for large trees. However, could you please provide more information about the use case of adaptive collapsing of node trees with an example as to understand the desired behaviour in detail? Thanks
Hey there,
the basic idea would as follows: Suppose you have a big tree with 3 big nodes that take up a lot of space. When I collapse the node in the middle, there is a big empty space between the top and bottom nodes. Therefore, i would suggest repainting the elements on the same level when an element is (un)collapsed.
Is that explanation clear enough?
Hey there !
Dragging would be pretty nice and doable for now, Although selective re-rendering is a 'no-idea-on-that-yet' for me.
Would like to contribute on this.
Its marked unassigned
, shall i take this up ? @AykutSarac
Initially when collapsing implemented it was re-rendering the entire graph. For big graphs, this is very inefficient.
I've opened a new issue for follow-up with details. #356