Skip to content
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

Fix Graph overflow, position and padding #23044

Merged
merged 1 commit into from
May 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions airflow/www/static/css/graph.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,25 @@ g.node text {
border-radius: 4px;
background-color: #f0f0f0;
cursor: move;
overflow: hidden;
height: 100%;
width: 100%;
}

#graph-svg {
overflow: visible;
}

.refresh-actions {
justify-content: flex-end;
min-width: 225px;
display: inline-flex;
align-items: center;
right: 20px;
margin-top: 10px;
margin-bottom: 15px;
position: absolute;
background-color: #f0f0f0ee; /* the last two chars apply an opacity to the background color */
}

.legend-item.dag {
Expand Down
2 changes: 1 addition & 1 deletion airflow/www/static/js/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ function setUpZoomSupport() {
const graphWidth = g.graph().width;
const graphHeight = g.graph().height;
// Get SVG dimensions
const padding = 20;
const padding = 80;
const svgBb = svg.node().getBoundingClientRect();
const width = svgBb.width - padding * 2;
const height = svgBb.height - padding; // we are not centering the dag vertically
Expand Down