From 215492d17a8c4ea55a7b2e57b3fd742a0574031c Mon Sep 17 00:00:00 2001 From: freget Date: Mon, 21 Jun 2021 17:25:24 +0200 Subject: [PATCH] Tree View UI for larger DAGs & more consistent spacing in Tree View (#16522) * Made squareX independent of screen width * Removed now unnecessary variable innerWidth. Co-authored-by: Brent Bovenzi Co-authored-by: Schneider, Thilo Co-authored-by: Brent Bovenzi (cherry picked from commit f9786d42f1f861c7a40745c00cd4d3feaf6254a7) --- airflow/www/static/js/tree.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airflow/www/static/js/tree.js b/airflow/www/static/js/tree.js index 882d7ce525c5f..07daf0e623c99 100644 --- a/airflow/www/static/js/tree.js +++ b/airflow/www/static/js/tree.js @@ -72,8 +72,7 @@ document.addEventListener('DOMContentLoaded', () => { }); treeDepth += 1; - const innerWidth = window.innerWidth > 1200 ? 1200 : window.innerWidth; - const squareX = innerWidth - (data.instances.length * squareSize) - (treeDepth * 50); + const squareX = (treeDepth * 25) + 200; const squareSpacing = 2; const margin = {