Skip to content

Conversation

@laellyo
Copy link
Contributor

@laellyo laellyo commented Jun 22, 2021

What does this PR do?

It adds the ability to automatically enable scrollbars when a DrawIO diagram width is higher than the browser/screen width.

Why this PR?

We have documentation with complex diagrams, that are sometimes very big.
Unfortunately, the access to these diagram is today unusable, beacause a part of them is not displayed. The reason is that their size is not adapted to the browser/screen size OR a scrollbar is not enabled.
I have decided to suggest this small fix (a new field in the CSS class .diagram) as it is a simple workaround enabling scrollbars.

Tests

You can test the change locally in your web browser by editting dynamically your CSS class or inject directly the CSS code in the Theme section of the admin page:

.diagram {
  overflow: auto
}

In case of large DrawIO diagrams, today it is sometimes impossible to display it totally on the screen.
This quick workaround provides a way to enable a scrollbar if the width of the diagram is higher than the browser/screen width.
@auto-assign auto-assign bot requested a review from NGPixel June 22, 2021 12:21
Copy link
Contributor

@broxen broxen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. Awesome PR!

@NGPixel NGPixel merged commit 5210e14 into requarks:dev Dec 26, 2021
jionggyu pushed a commit to jionggyu/wiki-2.5.302-patch that referenced this pull request Jul 9, 2024
In case of large DrawIO diagrams, today it is sometimes impossible to display it totally on the screen.
This quick workaround provides a way to enable a scrollbar if the width of the diagram is higher than the browser/screen width.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants