You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by jh...@apache.org on 2021/06/10 20:57:20 UTC
[airflow] 02/03: set max tree width to 1200px (#16067)
This is an automated email from the ASF dual-hosted git repository.
jhtimmins pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit fb714d6db9e28de113014364365202c82eb0ce22
Author: Brent Bovenzi <br...@gmail.com>
AuthorDate: Tue May 25 16:20:31 2021 -0400
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 04702a7..cc8276d 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 = {