front_idill/src/mosaic/js/mosaic.js
changeset 58 a28488078053
parent 55 afd60399a7b5
child 77 205409da0f32
--- a/front_idill/src/mosaic/js/mosaic.js	Mon Jul 30 16:45:46 2012 +0200
+++ b/front_idill/src/mosaic/js/mosaic.js	Tue Jul 31 16:26:00 2012 +0200
@@ -26,7 +26,7 @@
  */
 function Mosaic(config, default_conf)
 {
-    this.gestures = ["fall", "jump", "circle", "screw", "bend", "arc", "knee_up", "right_angle", "wave", "slow", "hello", "no_motion", "contact", "up_down", "grand_jete"];
+    this.gestures = ["fall", "jump", "circle", "screw", "bend", "arc", "knee-up", "right-angle", "wave", "slow", "hello", "no-motion", "contact", "up-down", "grand-jete"];
 
     //Chemin du fichier de configuration.
     this.config_path = config;
@@ -194,6 +194,8 @@
 	this.isHelpIconZoomed = false;
 	//Indique si l'icone d'aide est dans une interaction de zoom/dezoom en cours.
 	this.isHelpIconZooming = false;
+	//Indique à l'utilisateur s'il doit retirer ses mains pour refaire une recherche par courbes.
+	this.mustTakeOutHands = false;
     
     //Timeout (attente) pour le zoom après un préZoom.
     this.zoomTimeout = null;
@@ -498,7 +500,7 @@
 	if(this.isSearchByCurvesOn)
 	{
 		//On quitte la zone de recherche.
-		this.isUserInSearchZone = false;
+		/*this.isUserInSearchZone = false;
 		
 		//On regarde si ce qu'on a tracé correspond à une courbe en particulier.
 		var gesture_match = this.gestureWithSameCode(this.actualCode);
@@ -555,7 +557,7 @@
 			{
 				this.currentMode = "VIDEO";
 			}
-		}
+		}*/
 		//On dit au module de recherche qu'on arrête de tracer des courbes.
 		this.searchCanvas.onPointerOut();
 	}
@@ -821,7 +823,7 @@
     var _this = this;
     
     //Variables censées être des ints.
-    var supposedToBeInt = ['imagesByLine', 'imagesToShow', 'totalImages', 'timeReloadAfterResize', 'timePrezoom', 'timePreUnzoom', 'zoomTime', 'timeUnzoom', 'timeNeighbourGlowing', 'timeNeighbourUnglowing', 'timeMovingToNeighbour', 'timeSearchFade', 'timeNotifyFade', 'timeFilterFade', 'timeANFade', 'timeFilling', 'zoomedMargin', 'timeoutZoom', 'timeoutUnzoom', 'timeoutMoveToNeighbour', 'timeoutPointersIdle', 'timeoutAreBothPointersHere', 'timeoutRemoveNotificationByGesture', 'timeoutNotifySwipe', 'timeoutSelectTL', 'timeoutSlideTL', 'timeoutCanNotifyHelp', 'timeoutRemoveSpinner', 'timeoutNouser', 'timeoutNextDrawCurve', 'mouseUpDownDeltaTreshold', 'helpBorderSize'];
+    var supposedToBeInt = ['imagesByLine', 'imagesToShow', 'totalImages', 'timeReloadAfterResize', 'timePrezoom', 'timePreUnzoom', 'zoomTime', 'timeUnzoom', 'timeNeighbourGlowing', 'timeNeighbourUnglowing', 'timeMovingToNeighbour', 'timeSearchFade', 'timeNotifyFade', 'timeFilterFade', 'timeANFade', 'timeFilling', 'zoomedMargin', 'timeoutZoom', 'timeoutUnzoom', 'timeoutMoveToNeighbour', 'timeoutPointersIdle', 'timeoutAreBothPointersHere', 'timeoutRemoveNotificationByGesture', 'timeoutNotifySwipe', 'timeoutSelectTL', 'timeoutSlideTL', 'timeoutCanNotifyHelp', 'timeoutRemoveSpinner', 'timeoutNouser', 'timeoutNextDrawCurve', 'mouseUpDownDeltaTreshold', 'kinectUpDownDeltaTreshold', 'helpBorderSize'];
     //Variables censées êtres des floats.
     var supposedToBeFloat = ['zoomPercentage', 'prezoomPercentage'];
     
@@ -1084,13 +1086,13 @@
         //Après un délai d'absence de l'utilisateur on redémarre.
         this.nouserTimeout = setTimeout(function()
         {
-            window.location.reload();
+            // window.location.reload();
         }, this.config.timeoutNouser);
     }
     //S'il n'y a qu'un snapshot à afficher et qu'on est en préphase, on redémarre.
     else if((event == "NO-USER" || event == "INCOMING-0" || event == "INCOMING-1") && this.config.noUserModeEnabled)
     {
-        window.location.reload();
+        // window.location.reload();
     }
     //Si on a fait un swipe.
     else if(event.indexOf("SWIPE") != -1)
@@ -1162,7 +1164,7 @@
         //On la met en minuscule.
         gestureReceived = event.toLowerCase();
         //On met à jour la gesture recherchée.
-        this.currentSearchGesture[centerId] = gestureReceived;
+        this.currentSearchGesture[this.centerId] = gestureReceived;
     }
     //Si on a effectué un hello, qu'on peut notifier l'aide et que les deux mains ne sont pas dans la zone de recherche.
     else if(event.indexOf("HELLO") != -1 && this.canNotifyHelp && !this.areBothPointersHere)