plantuml / plantuml

Generate diagrams from textual description
https://plantuml.com
Other
9.73k stars 881 forks source link

Allow filer/focusing on a node and its neighbours dynamically in SVG #910

Open blipper opened 2 years ago

blipper commented 2 years ago

SVG generated images have clickable URLs (great!). However working on large diagrams with many connections (e.g. C4 System Landscape Diagrams) it would be nice to provide clickable functionality (maybe shift-click or a right click) functionality to only hide all nodes except the clicked node display a node, its edges, and immediately connecting nodes.

@startuml
package Z {
    A->B
    A->C
}
C->D
D->A
E->F
F->B
@enduml

image

If I shift-clicked or whatever on A it should display the following by hiding the other nodes image

It should keep the nested packages however.

blipper commented 2 years ago

This needs #925 as a prequisite.

blipper commented 2 years ago

Implemented in #930

image

Node, edges and 1 distance nodes with mouse over will be set to opacity 1.0 and the everything else will be set to lower opacity.

image

The-Lum commented 2 years ago

Hello @blipper,

Thanks a lot, very good enhancement... 👍

Is it cumulative with:

or independent ?

Regards.

blipper commented 2 years ago

Interesting. That code didn't work for me which is why I wrote this. I was using C4 UML that has a bunch of nested elements and you need the containers in other to capture the logical nesting structure I think?

itavero commented 1 year ago

Just wondering it there is any update on this. I'm also looking for this functionality for my C4 diagrams. It's unclear to me how to use the functionality added in #475 in the first place.

rizickus commented 1 year ago

Hi, any plans to include this feature in public release? Now I have to deal with messy diagrams and really would like not to go the path of simplifying or dividing into multiple separate diagrams. Having one with some level of interactivity would be awesome.

arnaudroques commented 1 year ago

Hi, any plans to include this feature in public release? Now I have to deal with messy diagrams and really would like not to go the path of simplifying or dividing into multiple separate diagrams. Having one with some level of interactivity would be awesome.

I'm confused here. The pull requests #475 and #478 have been merged in public release. You should probably open a new issue if you are expecting something else and describe it precisely. Thanks!

The-Lum commented 1 year ago

The pull requests https://github.com/plantuml/plantuml/pull/475 and https://github.com/plantuml/plantuml/pull/478 have been merged in public release.

Just to complete. The below PR have been also merged in public release:

And some help pages must be improve... to explain how to use... _:construction: A next work (When I will have time...) :constructionworker:

arnaudroques commented 1 year ago

Not related but avoid -> arrow and prefer --> ones.

@startuml
package Z {
    A-->B
    A-->C
}
C-->D
D-->A
E-->F
F-->B
@enduml

ex

rizickus commented 1 year ago

Hi, any plans to include this feature in public release? Now I have to deal with messy diagrams and really would like not to go the path of simplifying or dividing into multiple separate diagrams. Having one with some level of interactivity would be awesome.

I'm confused here. The pull requests #475 and #478 have been merged in public release. You should probably open a new issue if you are expecting something else and describe it precisely. Thanks!

Thanks! Looked at the code and got it working with !pragma svginteractive true.

kirchsth commented 1 week ago

With #1713 filtering is working (not directly in this window but if you open link to svg in a new window)

I only see that the package is not displayed in filter mode. But if this is not an issue then this issue could be closed too.

BR Helmut