-
-
Notifications
You must be signed in to change notification settings - Fork 894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add interactive functionality for Usecase diagrams exported to SVG #475
Conversation
Hi, We need to study your work before merging it. |
Hi! Yes, sure! Please, let me know how to do it properly :) Also, yesterday I was doing some tests and figured out one corner-case when JS code fails (so all functionality stops working).
... now I noticed you merged with the second commit too (the one that fixes the error I described above). But I made stupid mistake in it in JS (not sure why the error wasn't thrown at that time). So I fixed it just now and force pushed that second commit to my repo. |
We've just commit and push a slightly refactored version of your work. There is now a default.css and default.js files that contain your contribution. This will make updating those files more easy. We may have broken something (sorry about that...) , because the following example is not working for us:
Could you checkout the last version of the code and see what's happen ? Thanks again for your contribution ! |
I think that this is a very good idea but implementation could be much better. Now from what I can see there are propriatary classes/id/attributes generated in the svg and then a hard coded script to give exactly the functionality which the author or the MR is looking for. I believe that this way of development of interactive functionality will not bring a good future for PlantUML (to be honest I am really considering to switching to mermaid at this point for my project.) What I believe it should be done is that first of all every graphical element should be surounded with its own group tag. For example: should be represented as: This will be enough to create a tool for great svg interactivity. Unfortunatelly I am not a Java developer and it will take me enormous time and efford to start contributing to the code which at the moment I can not afford, but I would be very very happy to see this implemented. |
For the googlers landing here, in PR #930 a pragma functionality to enable this feature was introduced. Just add following line below
|
@koppor very nice, but the exported SVG (using Plantuml |
@jankap I have no clue about PlantUML diagrams and Edge. I would re-route you to https://forum.plantuml.net/. You need to make an MWE and execute plantuml on the command line. The command should be readble from the files in this repository - or googlable 😅. Sorry that I don't have better news. (I am currently not using PlantUML and this at all - therefore, there are delays in fixing and releasing 😅) |
Does the interactive svg works for all type of elements. I can see with If I replace all my |
Hi, all! I'm glad to contribute to this amazing tool! You guys are awesome!
With this feature we can navigate through complicated (aka spaghetti) Usecase diagrams by clicking on elements and viewing their neighbors. By element I mean actors, usecases and notes.
The logic of navigation:
P.S.
It's my first contribution to Java project and, honestly, the first written Java code too.
So, if I made something wrong, please let me know :)
In particular, I want to know how to add this JS-script more elegantly (with readability in mind).
And yes, I plan to add this feature to other diagram types - it will use the same JS-script and
<g class="...">
technique.