front_idill/src/mosaic/js/search.js
changeset 79 9eff85166868
parent 77 205409da0f32
child 89 b6a115568b52
--- a/front_idill/src/mosaic/js/search.js	Wed Aug 08 18:42:01 2012 +0200
+++ b/front_idill/src/mosaic/js/search.js	Thu Aug 16 14:32:19 2012 +0200
@@ -30,27 +30,28 @@
     //Si on est dans le cas d'un filtrage de mosaïque.
     if(this.currentMode == "FILTER")
     {
-        var mainPanel = $('#mainPanel');
+        /*var mainPanel = $('#mainPanel');
         top = mainPanel.position().top;
         left = mainPanel.position().left;
         width = mainPanel.width();
-        height = mainPanel.height();
-        margin_top = this.MPTop_margin;
+        height = mainPanel.height();*/
+        // margin_top = this.MPTop_margin;
         inMosaic = true;
     }
     //Sinon si c'est une recherche dans la vidéo.
     else if(this.currentMode == "SEARCH")
     {
-        top = this.snTop;
+        /*top = this.snTop;
         left = this.snLeft;
         width = this.snWidth;
-        height = this.snHeight;
-        margin_top = '0px';
+        height = this.snHeight;*/
+        // margin_top = '0px';
         inMosaic = false;
     }
     
     //On crée le canvas et on récupère le dictionnaire des courbes.
-    this.searchCanvas = new SearchCanvas(top, left, width, height, margin_top, this.timeSearchFade, inMosaic, this);
+    // this.searchCanvas = new SearchCanvas(top, left, width, height, margin_top, this.timeSearchFade, inMosaic, this);
+    this.searchCanvas = new SearchCanvas(0, 0, $(window).width(), $(window).height(), 0, this.timeSearchFade, inMosaic, this);
     this.searchCanvas.create(this.dictionary);
 }
 
@@ -354,7 +355,7 @@
         for(var j = 0 ; j < this.dictionary[i].codes.length ; j++)
         {
             //Si le code en entrée est une partie début d'un des codes.
-            if(this.dictionary[i].codes[j] === code)
+            if(this.dictionary[i].codes[j] === code || this.dictionary[i].codes[j].indexOf(code) == 0)
             {
                 //On retourne le nom de la gesture.
                 return this.dictionary[i].name;