From 9abb6fcac95961daf5bd1beda07361ccc5b78c69 Mon Sep 17 00:00:00 2001 From: "Schneider, Thilo" Date: Fri, 18 Jun 2021 07:17:36 +0200 Subject: [PATCH 1/2] Made squareX independent of screen width --- airflow/www/static/js/tree.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/static/js/tree.js b/airflow/www/static/js/tree.js index e108a21baf1ed..ae6aa80061ce3 100644 --- a/airflow/www/static/js/tree.js +++ b/airflow/www/static/js/tree.js @@ -73,7 +73,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 = { From e1e24e5ab7e159756fbedc69fa017eeb167859da Mon Sep 17 00:00:00 2001 From: freget Date: Sun, 20 Jun 2021 19:58:09 +0200 Subject: [PATCH 2/2] Removed now unnecessary variable innerWidth. Co-authored-by: Brent Bovenzi --- airflow/www/static/js/tree.js | 1 - 1 file changed, 1 deletion(-) diff --git a/airflow/www/static/js/tree.js b/airflow/www/static/js/tree.js index ae6aa80061ce3..0736bc146c85a 100644 --- a/airflow/www/static/js/tree.js +++ b/airflow/www/static/js/tree.js @@ -72,7 +72,6 @@ document.addEventListener('DOMContentLoaded', () => { }); treeDepth += 1; - const innerWidth = window.innerWidth > 1200 ? 1200 : window.innerWidth; const squareX = (treeDepth * 25) + 200; const squareSpacing = 2;