From 907025d7de85a94705ab74e040d2d088e47533ac Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 8 Apr 2015 14:52:09 +0200 Subject: campus: hide items when it is too small --- js/campus.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') 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') -- cgit v1.2.1