Skip to content

Commit

Permalink
[AIRFLOW-5503] Fix tree view layout on HDPI screen (apache#6125)
Browse files Browse the repository at this point in the history
- Tree view layout on HDPI screens overlaps and doesn't make full use of
screen real estate.

(cherry picked from commit 533086e)
  • Loading branch information
robinedwards authored and ashb committed Oct 14, 2019
1 parent a112c12 commit 1c84a01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions airflow/www/templates/airflow/tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,15 @@
<script>
$('span.status_square').tooltip({html: true});

var devicePixelRatio = window.devicePixelRatio || 1;
var data = {{ data|tojson|safe }};
var barHeight = 20;
var axisHeight = 40;
var square_x = 500;
var square_x = parseInt(500 * devicePixelRatio);
var square_size = 10;
var square_spacing = 2;
var margin = {top: barHeight/2 + axisHeight, right: 0, bottom: 0, left: barHeight/2},
width = 960 - margin.left - margin.right,
width = parseInt(960 * devicePixelRatio) - margin.left - margin.right,
barWidth = width * 0.9;

var i = 0,
Expand Down
5 changes: 3 additions & 2 deletions airflow/www_rbac/templates/airflow/tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@
<script>
$('span.status_square').tooltip({html: true});

var devicePixelRatio = window.devicePixelRatio || 1;
var data = {{ data|tojson|safe }};
var barHeight = 20;
var axisHeight = 40;
var square_x = 500;
var square_x = parseInt(500 * devicePixelRatio);
var square_size = 10;
var square_spacing = 2;
var margin = {top: barHeight/2 + axisHeight, right: 0, bottom: 0, left: barHeight/2},
width = 960 - margin.left - margin.right,
width = parseInt(960 * devicePixelRatio) - margin.left - margin.right,
barWidth = width * 0.9;

var i = 0,
Expand Down

0 comments on commit 1c84a01

Please sign in to comment.