From eefa56313a795e2c56b249d97178bc15406cf1c3 Mon Sep 17 00:00:00 2001 From: Brent Bovenzi Date: Tue, 25 May 2021 16:20:31 -0400 Subject: [PATCH] set max tree width to 1200px (#16067) the totalwidth of the tree view will depend on the window size like before, but max out at 1200px (cherry picked from commit f2aa9b58cb012a3bc347f43baeaa41ecdece4cbf) --- airflow/www/static/js/tree.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/airflow/www/static/js/tree.js b/airflow/www/static/js/tree.js index 04702a74fe9f4..cc8276d66f05a 100644 --- a/airflow/www/static/js/tree.js +++ b/airflow/www/static/js/tree.js @@ -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 = {