ls1intum / Apollon

UML Modeling Editor written in React
https://apollon-library.readthedocs.io
MIT License
65 stars 22 forks source link

`Development`: Fix issue with overflow of Text in the Color Description while exporting to PDF #270

Closed minrows closed 1 year ago

minrows commented 1 year ago

Checklist

Motivation and Context

This PR fixes the issue with overflow of text in color description while exporting the diagrams. Issue Number: https://github.com/ls1intum/Apollon/issues/267

Steps for Testing

  1. Goto test server
  2. Insert Color description to the canvas with long text.
  3. Export the diagram to PDF (or any other format).
  4. Observe that the text of the Color Description does not overflow. (As illustrated in screenshot section)

Screenshots

Before

screen-capture

After

screen-capture (1)

PS: Changes released in beta version: 2.12.5-beta.4

4ludwig4 commented 1 year ago

Tested it and it works to some degree. Not sure how the behavior should be for more than 3 lines? If not more than 3 lines, maybe the input chars should be limited to avaid the problem? Otherwise, it breaks again with 4 lines see screenshots. Screenshot from 2022-11-07 13-57-35 Screenshot from 2022-11-07 13-57-22

minrows commented 1 year ago

Ahh, thanks for the feedback @4ludwig4. This PR simply introduces the linebreak of the text which was not happening while exporting before. Regarding the overflow of the text vertically, the user has to manually increase the size of the element (which is the case for canvas as well).

4ludwig4 commented 1 year ago

Ah k didn't know that you can resize the boxes sry! Then the line breaks seem to be working now. Also, there is already a limit on the text boxes :wink: