From f9786d42f1f861c7a40745c00cd4d3feaf6254a7 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 --- 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 e108a21baf1ed..0736bc146c85a 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 = {