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

(cherry picked from commit f2aa9b5)
(cherry picked from commit eefa563)
  • Loading branch information
bbovenzi authored and kaxil committed Jun 22, 2021
1 parent 8fcc68d commit 9bcfd97
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 9bcfd97

Please sign in to comment.