Merge with upstream.
--- a/src/js/site.js.templ Fri Jan 27 16:23:00 2012 +0100
+++ b/src/js/site.js.templ Fri Jan 27 17:27:48 2012 +0100
@@ -48,12 +48,12 @@
},
"createAnnotationWidget" : {
keywords: ["#faux-raccord", "#mot-clef"],
- polemic_mode: true, /* enable polemics ? */
+ polemic_mode: true, /* enable polemics ? */
/* polemics - the corresponding class names defined in the css should be for instance :
Ldt-createAnnotation-polemic-plusplus for plusplus
Ldt-createAnnotation-polemic-equalequal for equalequal, etc.
*/
- polemics: {"++" : "plusplus", "--" : "minusminus", "==" : "equalequal", "??" : "questionquestion"},
+ polemics: {"++" : "positive", "--" : "negative", "==" : "reference", "??" : "question"},
cinecast_version: true /* put to false to enable the platform version, true for the festival cinecast one. */
},
"SparklineWidget" : {
@@ -71,7 +71,7 @@
where to
get the
ajax */
- ajax_granularity: 10000 /* how much ms should we look before and after the
+ ajax_granularity: 10000, /* how much ms should we look before and after the
current timecode */
project_url: IriSP.platform_url + "/ldtplatform/ldt/front/player/" /* the beginning
--- a/src/js/widgets/sliderWidget.js Fri Jan 27 16:23:00 2012 +0100
+++ b/src/js/widgets/sliderWidget.js Fri Jan 27 17:27:48 2012 +0100
@@ -53,26 +53,29 @@
var time = this._Popcorn.currentTime();
var duration = this._serializer.currentMedia().meta["dc:duration"] / 1000;
- var percent = ((time / duration) * 100).toFixed(2);
+ var percents = time / duration;
/* we do these complicated calculations to center exactly
the position Marker */
- var pixels_to_percents = 100 / this.selector.width(); /* how much is a pixel in percents */
+
+ var divWidth = this.selector.width();
+ var pixels = Math.floor(this.selector.width() * percents);
var positionMarker_width = this.positionMarker.width();
- var correction = (pixels_to_percents * positionMarker_width) / 2;
+ var correction = (positionMarker_width / 2);
/* check that we don't leave the left side */
- var newPos = percent - correction;
+ var newPos = pixels - correction;
if (newPos <= 0)
newPos = 0;
/* check that we don't leave the right side */
- var outPos = percent + correction;
- if (outPos > 100)
- newPos = 100;
+ var rightEdgePos = pixels + 1 * correction;
+
+ if (rightEdgePos >= divWidth)
+ newPos = divWidth - 1 * correction - 1;
- this.sliderForeground.css("width", percent + "%");
- this.positionMarker.css("left", newPos + "%");
+ this.sliderForeground.css("width", pixels + "px");
+ this.positionMarker.css("left", newPos + "px");
};