From 1dc963cdf3a8dcb7a7e6e02a9bcf049bda1809fb Mon Sep 17 00:00:00 2001 From: Josh Ryan Date: Tue, 12 Apr 2016 12:56:27 -0500 Subject: [PATCH] Need to set width of timeline correctly for #16 --- js/timeline.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/timeline.js b/js/timeline.js index 058253f..14ffe55 100644 --- a/js/timeline.js +++ b/js/timeline.js @@ -2,7 +2,11 @@ var months = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov", var scrollInterval; function buildTimeline(){ $( "#bottom" ).append( "
" ).append( "
" ) - var timeline = $( "
" ).width( 10 + 9*(dateRange[1] - dateRange[0])/86400000 ), + + var pointerCoarse = window.matchMedia("(pointer: coarse)"); + var dayWidth = pointerCoarse.matches ? 20 : 9; + + var timeline = $( "
" ).width( 10 + dayWidth*(dateRange[1] - dateRange[0])/86400000 ), track = $( "
" ).css( "width", "100%" ), month; $( "#bottom" ).append( $( "
" ).append( timeline.append(track) ) );