threat-dragon
threat-dragon copied to clipboard
v2 - reduce window white space for bigger model display
When working with bigger models, the model working area is too small, and it also replicates in the generated PDF. It even shows when zooming in. I include an example:
Describe the solution you'd like:
- More space to work, and less blank space.
- (Optional) zoom controls just for the model.
Working on Fedora Linux 33, using RPM version from the repo.
Hello @injcristianrojas This is a very good point, and it has been a problem for some time - thanks for putting it so clearly.
The root cause is that we are using the open version of jointjs, and this has a lot of limitations for Threat Dragon. We would like to migrate to using draw.io whicch would give the ability to properly zoom in and out, drag sections of the diagram, and so on. All the good stuff that we should expect.
The (vague) plan is to try and migrate to draw.io for version 2 of TD, and this would be done in the core of TD: https://github.com/OWASP/threat-dragon-core/projects
Are you able to help with this migration to draw.io? We could do with help in this area
I will check it out.
@jgadsden I don't have a way of simply launching the app on desktop (on the core repo), or should I switch to the desktop repo?
Hello @injcristianrojas - the core repo is common to both the threat dragon web app at: https://github.com/OWASP/threat-dragon and the desktop app at : https://github.com/OWASP/threat-dragon-desktop
so I agree that we can not run the core repo by itself, so I tend to use the desktop app for developing / testing the core repo. I think @mike-goodwin and @andk123 tend to use the web app during development of the core, so it is a personal preference.
If you want to get started on developing threat dragon core there are some dev notes that may help: https://github.com/OWASP/threat-dragon-core/blob/main/dev-notes.md#development
We definitely need help migrating to draw.io , so anything in this area would be great
Hello @injcristianrojas - I have started the project to use draw.io as the drawing package for Threat Dragon. This drawing package will sort out the working area, so you should see this when version 2.0 comes out
Transferred to threat dragon repo
With version 2.0 of Threat Dragon we see the same problem, screenshot attached. We need the 'Properties' and 'Threats' Panes to be docked with the lower edge of the window, so that the drawing area and 'Entities' panes can expand to fill the gap.
Note that this also happens with the web app version, just zoom out to see the effect.

@taoyiyang1 - the tutorials/documentation for the drawing package is here : https://x6.antv.vision/en/docs/tutorial/about
Is this issue something you could help with?
With version 2.0 of Threat Dragon we see the same problem, screenshot attached. We need the 'Properties' and 'Threats' Panes to be docked with the lower edge of the window, so that the drawing area and 'Entities' panes can expand to fill the gap.
I'm hoping we can do better with the placement of these panes as well! As it is, it's not looking so great on smaller screens. :(
If memory serves me, the height for the graph is currently hard-coded in pixels. This could even be as simple as changing it to use view-height as the unit with a min-size property?
Hello @lreading - absolutely agree, and you are best placed to do this one My thought here was that @taoyiyang1 could help out with the actual tutorials and documentation for antv? As 陶一阳 does not have a language barrier here
Could we assign this issue to both of you?
It turns out the graph area isn't super responsive by default (Google translate is leaving a little to be desired in the responsive section of the x6 docs). This means we might need to watch for window resizing events (or zoom events, if such a thing exists?) and redraw. That might have some performance implications... We could debounce the events to help mitigate that a bit.
I'm going to try to think of a better solution for this before committing anything. If anyone has ideas, please do share! :smile:
你好@lreading - 绝对同意,你最适合做这个 我的想法是@taoyiyang1可以帮助提供antv 的实际教程和文档?因为陶一阳在这里没有语言障碍
我们可以把这个问题分配给你们两个吗?
@jgadsden Of course, @lreading you can consult me if you have difficulty reading a certain part of the document
The diagram area is now working as required in version 2.0 : https://www.threatdragon.com/ So this can now be closed