diff options
author | Peter Wu <peter@lekensteyn.nl> | 2015-04-08 14:52:09 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2015-04-08 14:52:09 +0200 |
commit | 907025d7de85a94705ab74e040d2d088e47533ac (patch) | |
tree | 7d92fa0350ede3461282f4bb60644e97ed1b6382 /js | |
parent | 0d432fa16424dca8a60bed2f3bf5ffe26fff4ec7 (diff) | |
download | site-907025d7de85a94705ab74e040d2d088e47533ac.tar.gz |
campus: hide items when it is too small
Diffstat (limited to 'js')
-rw-r--r-- | js/campus.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/campus.js b/js/campus.js index 55e0efe..effd5b6 100644 --- a/js/campus.js +++ b/js/campus.js @@ -3,7 +3,7 @@ define(['campus-coords', 'd3'], function(coords, d3) { var imageUrl = 'images/campus.jpg'; var width = 1280, height = 893; - var scalingFactor = 0.75; + var scalingFactor = 780 / width; function initSvg(svg) { svg @@ -18,8 +18,8 @@ define(['campus-coords', 'd3'], function(coords, d3) { .attr('viewBox', [ 0, 0, - width / scalingFactor, - height / scalingFactor, + width, + height, ].join(' ')); svg.append('image') |