OWASP / threat-dragon

An open source threat modeling tool from OWASP
https://owasp.org/www-project-threat-dragon/
Apache License 2.0
902 stars 244 forks source link

Drawing canvas doesn't scale with window #615

Closed sparticvs closed 9 months ago

sparticvs commented 1 year ago

Describe the bug When the window is resized, the DFD drawing canvas doesn't resize with it.

Expected behaviour Expected the canvas to size to fill the window (or to have the ability to resize the panes in the window.

Environment

To Reproduce

  1. Open a threat model
  2. Click into the diagram
  3. Resize the window

Any additional context, screenshots, etc Screenshot from 2023-03-06 10-33-54

ChristopherHackett commented 1 year ago

Can also be reproduced on threatdragon.com (v2.0.1-demo). Suspect issue affects all environments.

jgadsden commented 1 year ago

thanks @sparticvs and @ChristopherHackett , this is a very good point I have labeled it as something for version 2.0, in the hope that we can sort it for then

jgadsden commented 1 year ago

not able to work out how to implement this: https://x6.antv.vision/en/docs/api/graph/graph#autoresize

The work around is to close the diagram and open it again - it then resizes for the new window size

jgadsden commented 1 year ago

Need to document the workaround attempt to correct this did not work: see 5b5b48b62ccb450dd8fb5d16f94e9c65a8f43c3d

Narasimha9271 commented 11 months ago

Can I work on this issue

raghav1030 commented 9 months ago

hey @jgadsden! I have tried to implement auto resizing as described in https://x6.antv.vision/en/docs/api/graph/graph#autoresize but haven't been able to. I am still trying to get a way out. Meanwhile I have implemented the window resizing issue that is the core problem as described in this raised issue.

here's what the update does :

https://github.com/OWASP/threat-dragon/assets/94848646/9fa7f9c1-c500-455b-b9c7-c5c33b5453be

jgadsden commented 9 months ago

thanks @raghav1030 , do you want to provide a pull request for this? Any incremental improvement is appreciated