Skip to content

Commit

Permalink
set max tree width to 1200px (#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

(cherry picked from commit f2aa9b5)
  • Loading branch information
bbovenzi authored and jhtimmins committed Jun 10, 2021
1 parent 789aace commit fb714d6
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 fb714d6

Please sign in to comment.