diff -r 9d7a2aa112fb -r 4e1ee94d70b1 front_idill/src/mosaic/js/search.js --- a/front_idill/src/mosaic/js/search.js Fri Jul 06 13:44:25 2012 +0200 +++ b/front_idill/src/mosaic/js/search.js Mon Jul 09 14:24:42 2012 +0200 @@ -152,10 +152,16 @@ */ mosaic.prototype.searchFilter = function(type) { + // type = 'a'; var _this = this; if(this.currentMode == "FILTER") { + for(var i = 0 ; i < this.config['imagesToShow'] ; i++) + { + this.currentSearchGesture[i] = type; + } + this.filterSearchedType = type; // console.log('Annotations length : ' + this.annotations.length); @@ -204,8 +210,19 @@ //On affiche l'opacité résultante pour chaque vidéo. for(var i = 0 ; i < this.config['imagesToShow'] ; i++)// in gestureNumberByVideo) { + //Toutes les videos ont cette recherche. + this.filterSearchedType[i] = type; //Opacité conventionelle. - var opacity = gestureNumberByVideo[this.urls[i]] / maxAnnotationNumber; + var opacity; + if(maxAnnotationNumber > 0) + { + opacity = gestureNumberByVideo[this.urls[i]] / maxAnnotationNumber; + } + else + { + opacity = 0; + } + // console.log('opacity b : ' + opacity + ' for ' + gestureNumberByVideo[i]); //Ce qui est à zéro le restera (par conséquent le snapshot associé sera invisible). if(opacity > 0) @@ -305,6 +322,11 @@ this.isMosaicFiltered = false; this.filterSearchedType = ''; + for(var i = 0 ; i < this.config['imagesToShow'] ; i++) + { + this.currentSearchGesture[i] = ''; + } + $('#notify_search').remove(); $('#notify_search_1gesture').remove(); $('.filterHiders').remove();