diff -r 2a83d308dba6 -r 0f86664b470d src/js/widgets/segmentsWidget.js --- a/src/js/widgets/segmentsWidget.js Thu Nov 10 11:04:43 2011 +0100 +++ b/src/js/widgets/segmentsWidget.js Thu Nov 10 11:44:45 2011 +0100 @@ -37,9 +37,20 @@ var end = Math.round((+ annotation.end) / 1000); var duration = this._serializer.currentMedia().meta["dc:duration"] / 1000; var id = annotation.id; - var startPourcent = IriSP.timeToPourcent(begin, duration) + onePxPercent * annotations.length * 2; - var endPourcent = IriSP.timeToPourcent(end, duration) - startPourcent; + var startPourcent = IriSP.timeToPourcent(begin, duration); + + /* some sort of collapsing occurs, so we only have to substract one pixel to each box instead of + two + */ + var endPourcent = IriSP.timeToPourcent(end, duration) - startPourcent - onePxPercent * 1; + + /* on the other hand, we have to substract one pixel from the first box because it's the only + one to have to effective 1px margins */ + if (i == 0) { + endPourcent -= onePxPercent; + } + var divTitle = annotation.content.title.substr(0,55); var color = annotation.content.color