diff -r d0c393730443 -r a28488078053 front_idill/src/mosaic/js/search.js --- a/front_idill/src/mosaic/js/search.js Mon Jul 30 16:45:46 2012 +0200 +++ b/front_idill/src/mosaic/js/search.js Tue Jul 31 16:26:00 2012 +0200 @@ -61,7 +61,7 @@ */ Mosaic.prototype.getDictionary = function() { - var path = this.config.curveDictionary; + var path = (this.config.mouseInteractions ? this.config.curveDictionaryMI : this.config.curveDictionaryKI); var dico = []; var _this = this; @@ -95,13 +95,16 @@ }); } -/*Mosaic.prototype.listenToPointers = function() +/* + * Ecoute la position des pointeurs si les deux sont détectés afin de tracer des courbes de recherche. +*/ +Mosaic.prototype.listenToPointers = function() { if(this.searchCanvas) { } -}*/ +} /* * Quitte une recherche par courbes. @@ -263,7 +266,15 @@ */ Mosaic.prototype.scaleIntervals = function(A, B, C, D, val) { - return (D - C + A) * val + (C - A); + // return (D - C + A) * val + (C - A); + if(A == B) + { + return (D - C) / 2; + } + else + { + return (D - C) * (val - A) / (B - A) + C; + } } /*