# HG changeset patch # User cavaliet # Date 1384783669 -3600 # Node ID 6d3bf30a171b7b131c2d574ecb6b2c5f66509861 # Parent 577421d64334e8c819d34ac1f0744e0a76699a84 debug timeline 0018154 diff -r 577421d64334 -r 6d3bf30a171b src/jocondelab/static/jocondelab/js/front-timeline.js --- a/src/jocondelab/static/jocondelab/js/front-timeline.js Mon Nov 18 14:16:09 2013 +0100 +++ b/src/jocondelab/static/jocondelab/js/front-timeline.js Mon Nov 18 15:07:49 2013 +0100 @@ -240,13 +240,13 @@ /* Now displaying the different terms that we will show on the timeline */ var html = _(tlCache).chain() .filter(function(item) { // Only show those within the range - return (item.end_year >= fromYear && item.start_year <= toYear && item.label); + return (item.end_year > fromYear && item.start_year < toYear && item.label); }).first(itemCount) // Take the first 12 .sortBy(function(item) { // Sort by mean year return (item.start_year + item.end_year); }).map(function(item) { // Render them as HTML - var l = Math.min(cWidth, Math.max(0, yrToX(item.start_year))), - r = Math.min(cWidth, Math.max(0, yrToX(item.end_year + 1))); + var l = Math.min(cWidth, Math.max(0, yrToX(Math.max(item.start_year, fromYear)))), + r = Math.min(cWidth, Math.max(0, yrToX(Math.min(item.end_year, toYear) + 1))); return itemTpl({ current: (item.dbpedia_uri == currentTerm), dbpedia_uri: item.dbpedia_uri,