Hover/Click Effects

0 votes
asked Nov 5 in Question / help by Tassos
Hello!

I was wondering if there was a way to add hover effects where I can maybe group objects to have a style applied when hovered? I have seen that there is !pragma svginteractive true

for example

@startuml

!pragma svginteractive true

rectangle A

rectangle B

rectangle C

@enduml

would there be some way to have it that if I hover rectangle A (or rectangle C) that it will apply a style to both of them i.e. a green background, when either one of them is hovered (without having to connect them)

I think I have seen a solution somewhere which auto applies the hover of connected objects, but I am wondering if there is a way to do it with objects that you choose, without them having to be connected?

Like maybe with <style></style> to create a style that highlights all objects that use the style, when any of them are hovered, and then apply that style to all of the desired objects, or maybe somehow with skinparams or something?

maybe something like

@startuml

!pragma svginteractive true

<style>

the style(s) here

</style>

rectangle A [style]

rectangle B

rectangle C [style]

@enduml

hover/click rectangle A or rectangle C to have the style apply to both rectangle A and rectangle C while hovered/clicked

 Sorry if this has already been answered somewhere

It would be a really nice way to colour code diagrams without having it be a mess of colours, by just being able to have the colour coded objects light up when any one of the group is hovered (or clicked would also be fine)

Thank you :)
commented Nov 5 by Tassos
If I do

@startuml

!pragma svginteractive true
rectangle a [[#group1]]
rectangle b
rectangle c [[#group1]]
rectangle d
rectangle e
@enduml

If I hover A or C, they are slightly darker grey than B D E, which is basically what I want, but is there a way to choose the style that is applied when hovering?

Thank you :)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...