Skip to content

Commit

Permalink
set max tree width to 1200px (apache#16067)
Browse files Browse the repository at this point in the history
the totalwidth of the tree view will depend on the window size like before, but max out at 1200px
  • Loading branch information
bbovenzi committed May 25, 2021
1 parent 44345f3 commit f2aa9b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airflow/www/static/js/tree.js
Expand Up @@ -70,7 +70,9 @@ document.addEventListener('DOMContentLoaded', () => {
if (node.depth > treeDepth) treeDepth = node.depth;
});
treeDepth += 1;
const squareX = window.innerWidth - (data.instances.length * squareSize) - (treeDepth * 50);

const innerWidth = window.innerWidth > 1200 ? 1200 : window.innerWidth;
const squareX = innerWidth - (data.instances.length * squareSize) - (treeDepth * 50);

const squareSpacing = 2;
const margin = {
Expand Down

0 comments on commit f2aa9b5

Please sign in to comment.